Re: Opinion about the using $GLOBALS directly

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

 



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


[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