note 69951 added to function.create-function

From: Date: Wed, 27 Sep 2006 19:45:52 +0000
Subject: note 69951 added to function.create-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-117744@lists.php.net to get a copy of this message
In regards to the recursion issue by info at adaniels dot nl Anon function recursion by referencing the function variable in the correct scope. <?php $fn2 = create_function('$a', 'echo $a; if ($a < 10) call_user_func($GLOBALS["fn2"], ++$a);'); $fn2(1); ?> ---- Server IP: 64.71.164.2 Probable Submitter: 66.251.95.180 ---- Manual Page -- http://www.php.net/manual/en/function.create-function.php Edit -- https://master.php.net/note/edit/69951 Del: integrated -- https://master.php.net/note/delete/69951/integrated Del: useless -- https://master.php.net/note/delete/69951/useless Del: bad code -- https://master.php.net/note/delete/69951/bad+code Del: spam -- https://master.php.net/note/delete/69951/spam Del: non-english -- https://master.php.net/note/delete/69951/non-english Del: in docs -- https://master.php.net/note/delete/69951/in+docs Del: other reasons-- https://master.php.net/note/delete/69951 Reject -- https://master.php.net/note/reject/69951 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117744) next »