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

From: Date: Sun, 21 Jul 2002 18:21:57 +0000
Subject: Bug #18452 Updated: Superglobals appear to not work...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14748@lists.php.net to get a copy of this message
ID: 18452 Updated by: tal@php.net Reported By: dilbert@hack3r.com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: OpenBSD PHP Version: 4.2.1 New Comment: Of course it doesn't work, you don't call the functions... -Tal Previous Comments: ------------------------------------------------------------------------ [2002-07-20 22:42:44] dilbert@hack3r.com An example of this failure can be seen here: http://roothack.org/~articles/test.php?var=value (wonder how many tries this is going to take...) ------------------------------------------------------------------------ [2002-07-20 22:41:40] dilbert@hack3r.com An example of this failure can be seen here: http://roothack.org/articles/test.php?var=value (case...) ------------------------------------------------------------------------ [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

« previous php.bugs (#14748) next »