|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23675 Autoglobals are not accessible through a variable variable
Submitted: 2003-05-17 19:45 UTC Modified: 2003-05-18 03:02 UTC
From: vma1 at abv dot bg Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5CVS-2003-05-17 (dev) OS: Slackware 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: vma1 at abv dot bg
New email:
PHP Version: OS:


 [2003-05-17 19:45 UTC] vma1 at abv dot bg
	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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-18 03:02 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Read from \"\"
(found by typing \"superglobals\" in our manual search box):

    Variable variables:  Superglobals cannot be used as variable variables.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 15:01:28 2024 UTC