TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Higher Order PHP

64 pointsby mudgeover 16 years ago

9 comments

CalmQuietover 16 years ago
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.
评论 #470003 未加载
ionfishover 16 years ago
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>
评论 #470250 未加载
评论 #470255 未加载
adatta02over 16 years ago
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>.
mlLKover 16 years ago
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.
评论 #470424 未加载
nuclear_eclipseover 16 years ago
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... :(
评论 #470160 未加载
评论 #470338 未加载
KevBurnsJrover 16 years ago
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>
lonestarover 16 years ago
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).
bpraterover 16 years ago
Some days, all I wish is that PHP had a shortcut assignment operator:<p><pre><code> $var = $tom || 'ed';</code></pre>
评论 #470345 未加载
jgfootover 16 years ago
Interesting and a worthwhile effort.