|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-03 09:22 UTC] daniel dot gorski at develnet dot org
[2003-03-03 20:14 UTC] sniper@php.net
[2003-03-04 04:57 UTC] rabus at users dot sourceforge dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Please try the following script: <?php function foo() { echo $_SERVER; } foo(); ?> This script returns "Array". This is the expected behavior. Now, try this one: <?php function foo() { $bar = '_SERVER'; echo $$bar; } foo(); ?> This time, an error is returned: Notice: Undefined variable: _SERVER on line 4 This is nonsense, of course: As we see in the example above, the variable should be defined!