referencing Superglobals with variable variables inside functions

From: Date: Mon, 31 Jan 2005 18:27:31 +0000
Subject: referencing Superglobals with variable variables inside functions
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-14457@lists.php.net to get a copy of this message
Atm it isn't possible to use a construct like $var = ${'_GET'}; inside a function or method. Will this behaviour change in future versions of PHP? I think it is somehow odd and inconsistent to not be able to use the superglobals that way, while it is possible outside of functions and methods and also with any other variable, e.g. the $HTTP_*_VARS. Imo it's an unnecessary restriction and will keep ppl using the old $HTTP_*_VARS. I also see no reason for it to stay that way and i think it wasn't intended by you, the developers, in the first place but turned out to work that way afterwards. So I really hope it'll change, would make much more sense. What do you think? Regards, Michael P.S.: Sorry for the "double" post, but i thought this is worth an own "topic".

« previous php.internals (#14457) next »