Re: Easier way to clean GET Variables ?

From: Date: Thu, 25 Aug 2005 08:54:21 +0000
Subject: Re: Easier way to clean GET Variables ?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-221342@lists.php.net to get a copy of this message
On Thu, August 25, 2005 2:56 am, Burhan Khalid wrote: > I would also in a real script, not use $_MyVar. $_XYZ use the $_ because they are superglobals. If your $_MyVar isn't a superglobal with http://php.net/runkit, it probably shouldn't be $_ That said, I do the same thing, for the variables I make that I WISH were superglobals. :-) Given that the list of superglobals is incredibly short, and that I know damn well the $_PATH variable I made up is NOT a superglobal, I've never had a problem doing this. But if I worked somewhere and the boss say "Don't do that" I'd just fix it and not argue, that's for sure. By all rights, $GLOBALS should be $_GLOBALS, but it existed way too early in PHP history and re-naming it would be a real pain. PS I *think* this explanation of $_ is in the manual, but maybe it's from some book/interview/paper from Rasmus or something... Sorry, can't remember where. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#221342) next »