Bug #18452: Superglobals appear to not work...

From: Date: Sun, 21 Jul 2002 02:39:03 +0000
Subject: Bug #18452: Superglobals appear to not work...
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14713@lists.php.net to get a copy of this message
From: dilbert@hack3r.com Operating system: OpenBSD PHP version: 4.2.1 PHP Bug Type: Variables related Bug description: Superglobals appear to not work... 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 bug report at http://bugs.php.net/?id=18452&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18452&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18452&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18452&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18452&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18452&r=support Expected behavior: http://bugs.php.net/fix.php?id=18452&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18452&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18452&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18452&r=globals

« previous php.bugs (#14713) next »