9 ms·
Nope, it should work for PHP 5.2 as well. Closures are implemented using a static member on a class that handles all the lexically scoped variables, not PHP 5.3
by Scriptor 16y ago
Nope, it should work for PHP 5.2 as well. Closures are implemented using a static member on a class that handles all the lexically scoped variables, not PHP 5.3's native closures.
- gfodor 16y agook, that is killer. awesome work!
- bergie 16y agoThis makes me curious, why reimplement features that would've been built-in in PHP 5.3? After all, 5.3 is now available in most major platforms including a Ubuntu LTS release and the latest RHEL. Other than that, Pharen looks very interesting. A minor detail is that I didn't yet figure out how to call static methods of external PHP classes.
- Kudose 16y agoI was curious to know the same thing. I do however like the code being side by side. It helps people who know PHP learn a little Lisp.
- Scriptor 16y agoI guess I wasn't exactly sure just how widespread PHP 5.3 was and wanted to play it safe. Also, even if new servers nowadays come with 5.3, a lot of existing code is still running on 5.2.
- bergie 16y agoThen again, you could argue that people interested in such projects like Pharen are likely to have modern PHP versions ;-)