From: xwisdom at yahoo dot com Operating system: PHP version: 5.2.5 PHP Bug Type: Feature/Change Request Bug description: Anonymous Functions
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 -- Edit bug report at http://bugs.php.net/?id=44539&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44539&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44539&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44539&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44539&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44539&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44539&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44539&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44539&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44539&r=support Expected behavior: http://bugs.php.net/fix.php?id=44539&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44539&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44539&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44539&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44539&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44539&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44539&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44539&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44539&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44539&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44539&r=mysqlcfg