ID: 31260 Updated by: [EMAIL PROTECTED] Reported By: sverel at mail dot ru -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows XP build 2600 (SP2) PHP Version: 4.3.8 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php "Variable variables: Superglobals cannot be used as variable variables inside functions or class methods." (c) http://www.php.net/manual/en/language.variables.predefined.php Previous Comments: ------------------------------------------------------------------------ [2004-12-22 23:34:54] sverel at mail dot ru Description: ------------ ------ Reproduce code: --------------- Not working: <?php $G= 'GLOBALS'; print "${$G}".'<HR>'; /* printing "Notice: Undefined variable: GLOBALS in C:\http\globals.php on line 22" */ print "${$G}<HR>"; /* printing "Notice: Undefined variable: GLOBALS in C:\http\globals.php on line 23" */ // print $GLOBALS.'<HR>'; ?> Working: <?php $G= 'GLOBALS'; print "${$G}".'<HR>'; // printing "Array" print "${$G}<HR>"; // printing "Array" print $GLOBALS.'<HR>'; ?> Expected result: ---------------- Notice: Undefined variable: GLOBALS in C:\http\globals.php on line 23 Actual result: -------------- Array ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31260&edit=1
