|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-26 17:38 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 07:00:02 2025 UTC |
Description: ------------ Hello, I would like to see improved anonymous functions in PHP6 or maybe 5.2.6 It would be really nice to be able to do the following similar to what we can do in Javascript: $fn = function($a,$b){ return $a + $b; } echo $fn(2,5); // with anonymous functions we can do things like: $object.each(function($index,$value) { // do something here }); // to remove reference to the function we just do this: unset($fn); // or $fn = null; Anonymous functions must conform to scope and maybe closures, etc. __ xwisdom http://xwisdomhtml.com