Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10847 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9121 invoked by uid 1010); 30 Jun 2004 06:27:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9093 invoked from network); 30 Jun 2004 06:27:39 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 30 Jun 2004 06:27:39 -0000 Received: (qmail 30045 invoked by uid 546); 30 Jun 2004 06:27:39 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 30 Jun 2004 06:27:39 -0000 Date: Wed, 30 Jun 2004 02:27:39 -0400 (EDT) X-X-Sender: adam@miranda.org To: Gareth Ardron cc: Marcus Boerger , Florian Schaper , internals@lists.php.net In-Reply-To: <1088553055.2185.31.camel@mesa> Message-ID: References: <000b01c45d02$95eab040$9f00a8c0@silverbox> <1357343140.20040629195517@marcus-boerger.de> <1088553055.2185.31.camel@mesa> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] __Destruct() functionality From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) 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!