At 03:55 PM 2/9/2004 +0000, Stephane Drouard wrote:IMO, this is bad programming. If an object wants to access another object (global or not), it has to own a reference on it
You are getting into coding style now.
It is coding style, you are right.
However, order of destructors cannot be worse that "in random order", can them ?
If we implement the same sort of destruction algorithm for globals as for locals, people like Stephane (no circlar dependencies, no use of a global without a reference) will be happy, others will see no difference from the actual "random order".
This solution is not perfect. It may be not possible to find a perfect way to deals with globals, be we may have a "non-perfect-but-better" way.
Actual behavior for globals is (as I understand) random order destruction. Anything we do to find an order (even if not perfect in all case/style) can only be better IMHO.
-- Eric Daspet
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php