This is why I appreciate YHacker News: Don't know when I would have run across this otherwise.<p>Futher comment shall wait until after my first hand dabbling in a new approach: In my next non-mission-critical PHP web hobbyist app.
It's worth noting that functions created via create_function won't be garbage-collected, which can cause some obvious problems.<p>This article about partial application may also be of interest to PHP hackers with an interest in functional programming.<p><a href="http://metapundit.net/sections/blog/166" rel="nofollow">http://metapundit.net/sections/blog/166</a>
It seems like what the PHP team really needs to do is drop backwards compatibility with PHP4+ (on the road map for 6 maybe?), clean up the OO implementation, and then implement closures and anonymous functions.<p>What they need to NOT do is ridiculous things like this <a href="http://news.php.net/php.internals/41374" rel="nofollow">http://news.php.net/php.internals/41374</a>.
This is killer. Such a simple (and sharp) tool written for PHP is ideal for managing/debugging bloated framework/CMS <i>X</i> while also automating redundant-administrative operations from the bottom-up. Thanks for sharing; considering the potential of something this + Kohana could inspire some top-notch web apps, if not, at least some elegant back-to-the-basics way to code. EDIT: I think the expression I'm looking for is, straight-forward code control helps control project chaos, which is an inevitable side-effect for anything ambitious in PHP.
The real problem here is that the chances of PHP 5.3 being used in production anytime soon are rather slim. "Stable" distros, like Debian, Red Hat and CentOS, are still using PHP 5.1, which has long since been found to have issues that have been fixed and improved in PHP 5.2. Some hosts are still not even up to that level...<p>For open-source projects like what I'm working on, our need to support a wide variety of hosting environments means that we took flack even just dropping compatibility for PHP 4 and 5.0.<p>I would love to be able to start using some of the newer/better features arriving in 5.3, but sadly, PHP 6.1 will likely be out before I can ever start using those features in public projects... :(
PHP IS becoming more dynamic.<p>Personally, I'm really looking forward to late static binding in 5.3<p><a href="http://us3.php.net/oop5.late-static-bindings" rel="nofollow">http://us3.php.net/oop5.late-static-bindings</a>
Since I use PHP at work, I've been waiting eagerly for closures since I first heard they'd be in 5.3.<p>Hopefully this stable release will have fewer issues than 5.1, and we can all upgrade quickly. I'm getting a little tired of cursing PHP's lack of lexical closures everyday (and I'm sure my co-workers are tired of listening to me complain).