Re: Re: RE: [PHP-DEV] Re: [PHP-QA] $obj = new foo() patch

From: Date: Mon, 13 Nov 2000 02:57:07 +0000
Subject: Re: Re: RE: [PHP-DEV] Re: [PHP-QA] $obj = new foo() patch
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-37871@lists.php.net to get a copy of this message
As I understand it, altering $GLOBALS directly is *UNSUPPORTED* -- Don't do it. Use global and an assignment.
I'd say in contrary, don´t use "global" unless you need a reference in the currently active scope and sometimes you just don´t need any (eg. single access)
Don't dink around with an internal structure ($GLOBALS) to do something where there is instead a documented solution.
Maybe it´s time to add some information about $GLOBALS (placed in todo)
I believe Rasmus or Zeev even said this on the PHP General list, way back when.
it was meant "for *general* purpose" only I think :) as zeev said sometimes you just can´t avoid using it playing around with references and several times it just makes more sense (performance wise) to use the $GLOBALS array... andré

« previous php.dev (#37871) next »