Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10836 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66282 invoked by uid 1010); 29 Jun 2004 17:55:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66251 invoked from network); 29 Jun 2004 17:55:20 -0000 Received: from unknown (HELO mx.thebrainroom.net) (69.55.226.195) by pb1.pair.com with SMTP; 29 Jun 2004 17:55:20 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id F20E714880CE; Tue, 29 Jun 2004 10:54:14 -0700 (PDT) Received: from BAUMBART (pD95F897C.dip.t-dialin.net [217.95.137.124]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id C05DF14880CC; Tue, 29 Jun 2004 10:54:12 -0700 (PDT) Date: Tue, 29 Jun 2004 19:55:17 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1357343140.20040629195517@marcus-boerger.de> To: Florian Schaper Cc: internals@lists.php.net In-Reply-To: <000b01c45d02$95eab040$9f00a8c0@silverbox> References: <000b01c45d02$95eab040$9f00a8c0@silverbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.8 required=5.0 tests=PRIORITY_NO_NAME autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] __Destruct() functionality From: helly@php.net (Marcus Boerger) Hello Florian, there is no problem in calling resource destructors/terminators in your destructors. You simply cannot output text to your pages from them. If this is not true then we need to fix it. For example if an object of yours holds a database connection and your destructor executes some SQL code this must work. Open a bug report if necessary. regards marcus Monday, June 28, 2004, 1:25:15 PM, you wrote: > 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 -- Best regards, Marcus mailto:helly@php.net