note 101925 added to functions.variable-functions
| From: | liuscmail at gmail dot com | Date: | Tue, 18 Jan 2011 17:17:58 +0000 |
| Subject: | note 101925 added to functions.variable-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175869@lists.php.net to get a copy of this message | ||
$fun = "reftest";
$fun();
reftest();
function reftest() {
function foo(){ echo "foo";}
$a = 123;
$b = &$a;
$b = 321;
print $a.nl;
println($b);
}
the second invokation from reftest() will get fatal error:
the reftest() can be only invoked once apparently.
321
321
Fatal error: Cannot redeclare foo() (previously declared in D:\Program
Files\php-5.3.5-Win32-VC9-x86\test.php:35) in D:\Program Files\php-5.3.5-Win32-VC9-x86\test.php on
line 35
----
Server IP: 69.147.83.197
Probable Submitter: 114.93.22.226
----
Manual Page -- http://www.php.net/manual/en/functions.variable-functions.php
Edit -- https://master.php.net/note/edit/101925
Del: integrated -- https://master.php.net/note/delete/101925/integrated
Del: useless -- https://master.php.net/note/delete/101925/useless
Del: bad code -- https://master.php.net/note/delete/101925/bad+code
Del: spam -- https://master.php.net/note/delete/101925/spam
Del: non-english -- https://master.php.net/note/delete/101925/non-english
Del: in docs -- https://master.php.net/note/delete/101925/in+docs
Del: other reasons-- https://master.php.net/note/delete/101925
Reject -- https://master.php.net/note/reject/101925
Search -- https://master.php.net/manage/user-notes.php