Re: __Destruct() functionality

From: Date: Wed, 30 Jun 2004 06:27:39 +0000
Subject: Re: __Destruct() functionality
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-10847@lists.php.net to get a copy of this message
On Wed, 30 Jun 2004, Gareth Ardron wrote: > Does the examples I gave you before not count ? Yes. It does not count. > in this case, the __destruct() function within someOtherClass does > absolutly bugger all. You can't reference one object from another's destructor. PHP makes no promises about the order it'll destroy your objects during shutdown. If you require objects to be destroyed in a particular sequence, then you need to unset() them manually. This issue has been discussed previously. Check the archives for more information about why this is and why "fixing" it is difficult / impossible. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!

« previous php.internals (#10847) next »