From: t-bader at gmx dot net Operating system: Windows Vista/7 PHP version: 5.3.1 PHP Bug Type: Variables related Bug description: Incorrect initialization of $_SERVER
Description: ------------ The manual says that Superglobals can be referenced by variable variables in global scope. For the $_SERVER superglobal does this only work at it first "normal" usage. <?php $Superglobal = '_SERVER'; var_dump($$Superglobal); ?> Outputs: NULL But if i use the $_SERVER Variable after the var_dump(); the var_dump()s output is correct: <?php $Superglobal = '_SERVER'; var_dump($$Superglobal); $_SERVER; var_dump($$Superglobal); ?> Both var_dump()s output the whole $_SERVER array. If i remove the line with $_SERVER; both var_dump()s output is NULL. Reproduce code: --------------- <?php $Superglobal = '_SERVER'; var_dump($$Superglobal); ?> Expected result: ---------------- Array containing the $_SERVER variables Actual result: -------------- NULL -- Edit bug report at http://bugs.php.net/?id=50929&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50929&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50929&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50929&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50929&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50929&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50929&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50929&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50929&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50929&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50929&r=support Expected behavior: http://bugs.php.net/fix.php?id=50929&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50929&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50929&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50929&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50929&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50929&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50929&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50929&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50929&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50929&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50929&r=mysqlcfg
