Closures and Lambda Functions appear to have been accepted (5.3 or 6.0 ? ), plus some other interesting things (__invoke() ! ):
http://wiki.php.net/rfc/closures
Which is linked from here:
http://wiki.php.net/rfc#accepted
Closures and Lambda Functions in PHP?!?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
Re: Closures and Lambda Functions in PHP?!?
It's all the rage to push these new things into 5.3. 5.3 is old 6.0 (minus the Unicode goodies). I remember there was lots of naysaying on these back months ago, nice to see them make it through.
Re: Closures and Lambda Functions in PHP?!?
some more: http://dikini.net/20.06.2008/php_closur ... ctions_rfc
Definitely an exciting topic for PHP. I think anonymous functions and closures will be a very welcome addition.
Definitely an exciting topic for PHP. I think anonymous functions and closures will be a very welcome addition.
Re: Closures and Lambda Functions in PHP?!?
In my dayjob I currently do a lot of Lua coding, and having real lambdas with a no-nonsense syntax is a real boon. Pity the designers did so much cowdung in other aspects of the language. Sensible variable scope mechanisms, namespaces and functions as first-class values are the things I miss the most in PHP.
The lambda syntax looks peachy, but the closures are ... cumbersome. Again the scope issues of PHP show their ugly face ->
The lambda syntax looks peachy, but the closures are ... cumbersome. Again the scope issues of PHP show their ugly face ->
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Closures and Lambda Functions in PHP?!?
Gets the thumbs up from moi!
Anonymous object support would be even more welcome!