#23675 [NEW]: Autoglobals are not accessible through a variable variable

From: Date: Sun, 18 May 2003 00:45:01 +0000
Subject: #23675 [NEW]: Autoglobals are not accessible through a variable variable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39858@lists.php.net to get a copy of this message
From: vma1 at abv dot bg Operating system: Slackware 9 PHP version: 5CVS-2003-05-17 (dev) PHP Bug Type: Variables related Bug description: Autoglobals are not accessible through a variable variable <? abc123 (); function abc123 () { $name = "_SERVER"; printf ("%s<br>", ${$name}["SERVER_NAME"]); } ?> The _SERVER autoglobal array is not accessible through a variable variable. The above script gives the following error: Notice: Undefined variable: _SERVER in /usr/local/apache/site/htdocs/zzz.php on line 7 When the _SERVER array is accessed directly (not through a variable variable) everything works correctly. Here is the configure line: ./configure --with-pgsql --with-apache=../apache-1.3 --enable-track-vars --with-pfpro=/usr/local/src/payflowpro/linux --with-imap=/usr/local/src/imap-2003.DEV.SNAP-0304071905 --with-imap-ssl=/usr/include/openssl --without-pear -- Edit bug report at http://bugs.php.net/?id=23675&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23675&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23675&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23675&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23675&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23675&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23675&r=support Expected behavior: http://bugs.php.net/fix.php?id=23675&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23675&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23675&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23675&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23675&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23675&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23675&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23675&r=gnused

« previous php.bugs (#39858) next »