|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-20 22:39 UTC] dilbert at hack3r dot 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 03:00:01 2025 UTC |
you just told me I was crazy ;) but okay, I fixed that problem (heh) this STILL isn't a bogus bug, however... Look at the example page i supplied above, .... echo "<br><hr>"; $h = "_GET"; print_r($$h); // Works! echo "<br><hr>"; function pr2() { $g = "_GET"; print_r($$g); } // DOESN'T WORK! pr2(); .... That part is still true. Comments and all. Now, thats the bug I was dealing with previously (before i screwed up and figured all superglobals didn't work :/) I knew I messed something up, at least I've finally got this refined... Am I missing something again, or have I finally nailed it? Ted