Sancar Saran schreef: > 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; there is no real difference between 'global $foo' and $GLOBALS['foo'], and the second is probably more maintainance friendly (as Rob pionted out) that said, avoid globals like the plague - sometimes you may come up with a situation where using a global is really necessary - such situations should be the exception rather than the rule, often if your thinking of using a global there is another way of doing it. jmho > > Regards > > Sancar > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php