note 101925 deleted from functions.variable-functions by danbrown
| From: | danbrown@php.net | Date: | Tue, 18 Jan 2011 17:48:05 +0000 |
| Subject: | note 101925 deleted from functions.variable-functions by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175871@lists.php.net to get a copy of this message | ||
Note Submitter: liuscmail at gmail dot com
Reason: useless
----
$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