#19352 [Opn->Bgs]: can't dynamically access superglobals
| From: | sniper@php.net | Date: | Wed, 11 Sep 2002 13:44:58 +0000 |
| Subject: | #19352 [Opn->Bgs]: can't dynamically access superglobals | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19035@lists.php.net to get a copy of this message | ||
ID: 19352
Updated by: sniper@php.net
Reported By: soletan@toxa.de
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Linux 2.4.18
PHP Version: 4.2.3
New Comment:
http://www.php.net/manual/en/language.variables.variable.php
The last paragraph..
Previous Comments:
------------------------------------------------------------------------
[2002-09-11 04:07:39] soletan@toxa.de
Hi,
I'm running Apache 2.0.40 with PHP 4.2.3 as DSO.
Within my scripts I realised a problem that I tried to test specially
now with a smaller script.
-----------------------
<?php
$method = "_GET";
echo $$method["id"];
var_dump( $$method );
?>
-----------------------
produces on call with ?id=the+test added to the script's URL
-----------------------
array(1) {
["id"]=>
string(8) "the test"
}
-----------------------
The echo output isn't there. If I try to assign it to some other value
it gets set to NULL.
Is it a general change of PHP's behaviour or any error? Earlier I used
this to reload a form's values, after dynamically creating and
arranging it into some structure. However, that days I used the
non-superglobal $HTTP_GET|POST_VAR ... this is obsolete, isn't it? And
that's why I won't get back to use it any further ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19352&edit=1