#44539 [Opn->Bgs]: Anonymous Functions

From: Date: Wed, 26 Mar 2008 17:38:08 +0000
Subject: #44539 [Opn->Bgs]: Anonymous Functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123675@lists.php.net to get a copy of this message
 ID:          44539
 Updated by:  colder@php.net
 Reported By: xwisdom at yahoo dot com
-Status:      Open
+Status:      Bogus
 Bug Type:    Feature/Change Request
 PHP Version: 5.2.5
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

http://wiki.php.net/gsoc/2008#anonymous_functions_and_closures_and_other_missing_object_oriented_features


Previous Comments:
------------------------------------------------------------------------

[2008-03-26 16:36:32] xwisdom at yahoo dot com

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 this bug report at http://bugs.php.net/?id=44539&edit=1



Thread (2 messages)

« previous php.bugs (#123675) next »