Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14379 invoked by uid 1010); 28 Jun 2004 11:25:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14177 invoked from network); 28 Jun 2004 11:25:49 -0000 Received: from unknown (HELO distance.intux.org) (213.239.198.8) by pb1.pair.com with SMTP; 28 Jun 2004 11:25:49 -0000 Received: (qmail 9710 invoked from network); 28 Jun 2004 11:20:51 -0000 Received: from unknown (HELO silverbox) (intux?org?fschaper@213.23.234.98) by distance.intux.org with SMTP; 28 Jun 2004 11:20:51 -0000 Message-ID: <000b01c45d02$95eab040$9f00a8c0@silverbox> To: Date: Mon, 28 Jun 2004 13:25:15 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: [PHP-DEV] __Destruct() functionality From: fschaper@intux.org ("Florian Schaper") Marcus Boerger wrote: > Hello Gareth, > > __destruct will get executed during request shutdown after the > communication has been shutdown. The only way to be able to write > from within __destruct is to deinitialize it at the end of the > script and therefore before the request is being finished. To > do so you can use 'unset($object);' > But then again why call destruct on the objects after the external modules have been shut down? This heavily confuses people and I see no apparent reason to do so (then again I'm not deep into the PHP internal structure)? I find it highly attractive to be able to save a "session"-object via my destructor / close DB connections - you name it. zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC); before php_call_shutdown_functions(); etc. Can somebody enlighten me? ./regards Florian