Re: New destructors implementation
| From: | Andi Gutmans | Date: | Mon, 09 Feb 2004 22:01:05 +0000 |
| Subject: | Re: New destructors implementation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7680@lists.php.net to get a copy of this message | ||
At 03:55 PM 2/9/2004 +0000, Stephane Drouard wrote:
== Quote from Andi Gutmans (andi@zend.com)'s article He doesn't necessarily own a reference but tries to access it in the destructor. IMO, this is bad programming. If an object wants to access another object (global or not), it has to own a reference on it, to guaranty the referenced object will be destroyed afterwards (so including destructor).You are getting into coding style now. The bottom line is that there are lots of different ways of writing code and many ppl do different stuff and often odd stuff. We think the solution that exists today is most likely to suit the largest amount of PHP users. The same way you are complaining ppl will complain if they can't access $GLOBALS[] from the destructor. Andi