At 20:33 20/04/2002 +0300, Zeev Suraski wrote: >It applies, to a degree. If you directly reference $GLOBALS anywhere in >your function, you can also reference it indirectly. If you don't, >however, indirect reference won't work. > >E.g., > >function foo() >{ > $foo = "GLOBALS"; > print $$foo["bar"]; // won't work >} > > >function foo() >{ > $GLOBALS; > $foo = "GLOBALS"; > print $$foo["bar"]; // will work >} > >That's a side effect of implementation, though, so I think it's best to >say that indirect reference to $GLOBALS is not supported.
Yes, I also think we should document that indirect references to $GLOBALS shouldn't be used. It might change. Andi -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php