Bug #18452 Updated: Superglobals appear to not work...
| From: | dilbert at hack3r dot com | Date: | Sun, 21 Jul 2002 02:41:40 +0000 |
| Subject: | Bug #18452 Updated: Superglobals appear to not work... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14714@lists.php.net to get a copy of this message | ||
ID: 18452
Updated by: dilbert@hack3r.com
Reported By: dilbert@hack3r.com
Status: Open
Bug Type: Variables related
Operating System: OpenBSD
PHP Version: 4.2.1
New Comment:
An example of this failure can be seen here:
http://roothack.org/articles/test.php?var=value
(case...)
Previous Comments:
------------------------------------------------------------------------
[2002-07-20 22:39:02] dilbert@hack3r.com
An example of this failure can be seen here:
http://roothack.org/Articles/test.php?var=value
The Source to that page is here:
<?
// PHP 4.2.1
// get like: file.php?name=hi
// Isn't $_GET supposed to be "superglobal" ?
print_r($_GET); // Works!
echo "<br><hr>";
function pr1() { print_r($_GET); } // DOESN'T WORK!
echo "<br><hr>";
$h = "_GET";
print_r($$h); // Works!
echo "<br><hr>";
function pr2() { $g = "_GET"; print_r($$g); } // DOESN'T WORK!
echo "<br><hr>";
function pr3() { global $_GET; print_r($_GET); } // DOESN'T WORK!??
?>
Information about the server can be found here:
http://roothack.org/~articles/test2.php
(its phpinfo();)
Please tell me I'm not crazy... ;)
Ted Kaminski
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18452&edit=1