ID: 18452 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Bogus +Status: Closed -Bug Type: Variables related +Bug Type: Documentation problem Operating System: OpenBSD PHP Version: 4.2.1 New Comment:
autoglobals (superglobals) don't work as variable variables. This is known and comes up every so often. It's documented here: http://www.php.net/manual/en/language.variables.variable.php I've added a note at php.net/variables.predefined and it'll show up within the next few days. Am marking this as a closed documentation bug. Regarding the last note, autoglobals have never been nor will they ever be deprecated. The older $HTTP_*_VARS are deprecated yet I'm pretty sure they'll be around forever. Previous Comments: ------------------------------------------------------------------------ [2002-11-10 12:01:16] [EMAIL PROTECTED] try using $HTTP_GET_VARS rather than $_GET... I am new to this so I might be wrong but the $_GET and $_POST etc seem deprecated in this version. ------------------------------------------------------------------------ [2002-07-22 19:54:18] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [2002-07-21 14:21:57] [EMAIL PROTECTED] Of course it doesn't work, you don't call the functions... -Tal ------------------------------------------------------------------------ [2002-07-20 22:42:44] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] An example of this failure can be seen here: http://roothack.org/articles/test.php?var=value (case...) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18452 -- Edit this bug report at http://bugs.php.net/?id=18452&edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php