Re: Easier way to clean GET Variables ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux