Req #50877 [Opn->Csd]: Provide javascript equivalent of arguments.callee (closures)

From: Date: Wed, 24 Nov 2010 08:53:00 +0000
Subject: Req #50877 [Opn->Csd]: Provide javascript equivalent of arguments.callee (closures)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156356@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=50877&edit=1

 ID:                 50877
 Updated by:         jani@php.net
 Reported by:        giorgio dot liscio at email dot it
 Summary:            Provide javascript equivalent of arguments.callee
                     (closures)
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   all
 PHP Version:        5.3.1
-Assigned To:        
+Assigned To:        jani
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2010-05-28 21:33:22] dchurch at sciencelogic dot com

This can already be done.  Use the following code:

$countup = function($count) use (&$countup)
{
    echo $count++;
    if ($count<100)
        $countup($count);
};
$countup();

------------------------------------------------------------------------
[2010-01-29 06:43:42] giorgio dot liscio at email dot it

Description:
------------
hi, in future i hope to can get the callee of an anonymous function...
for example:

Reproduce code:
---------------
function(&$count) use (0)
{
     echo $count++;
     if($count<100)
     {func_get_callee()}($count);
}



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50877&edit=1


Thread (3 messages)

« previous php.bugs (#156356) next »