Req #50877 [Com]: Provide javascript equivalent of arguments.callee (closures)

From: Date: Fri, 28 May 2010 19:33:23 +0000
Subject: Req #50877 [Com]: Provide javascript equivalent of arguments.callee (closures)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150920@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 Comment by: dchurch at sciencelogic dot com Reported by: giorgio dot liscio at email dot it Summary: Provide javascript equivalent of arguments.callee (closures) Status: Open Type: Feature/Change Request Package: Feature/Change Request Operating System: all PHP Version: 5.3.1 New Comment: This can already be done. Use the following code: $countup = function($count) use (&$countup) { echo $count++; if ($count<100) $countup($count); }; $countup(); Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#150920) next »