Re: Opinion about the using $GLOBALS directly

From: Date: Thu, 20 Dec 2007 19:50:28 +0000
Subject: Re: Opinion about the using $GLOBALS directly
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-266185@lists.php.net to get a copy of this message
On Wed, December 19, 2007 11:22 am, Stut wrote: >> well, if you have a long and complex function declaration which >> begins >> with global $whatever, and then all over the function $whatever is >> used, >> some dozens of lines later when looking for something in the code >> you >> might not have any idea that $whatever is global... however if you >> used >> $GLOBALS['whatever'] everywhere it would be trivial. > > Indeed. I don't really care how long the function is. $connection is a global in the scripts. It's the only global there is. It's a global in any function that needs it. If I can't remember that from day to day, then I need to find a nurse to take care of me... [shrug] -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#266185) next »