Req #50877 [Opn->Csd]: Provide javascript equivalent of arguments.callee (closures)
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)