On Wed, 2007-12-19 at 12:13 +0200, Sancar Saran wrote:
> Hello list.
> 
> I want know  to you opinions about using $GLOBALS directly.
> 
> like
> 
> $GLOBALS['myString'] = 'test';
> $GLOBALS['myArray']['this'] = 'this';
> $GLOBALS['myArray']['that'] = 'that';
> $GLOBALS['myClassObj] = new SomeClass;

It can avoid problems sometimes (files included via functions) and it's
obvious from reading the code exactly where the variable is being set.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

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

Reply via email to