Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26133 invoked by uid 1010); 19 Aug 2004 07:53:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26108 invoked from network); 19 Aug 2004 07:53:48 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 19 Aug 2004 07:53:48 -0000 Received: (qmail 20548 invoked from network); 19 Aug 2004 07:53:47 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 19 Aug 2004 07:53:47 -0000 Message-ID: <5.1.0.14.2.20040819103812.08419700@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 19 Aug 2004 10:53:46 +0300 To: "Sara Golemon" Cc: internals@lists.php.net In-Reply-To: <20040819053221.32797.qmail@pb1.pair.com> References: <4123D1B5.3080203@caedmon.net> <20040819090436.788cd2bf.tony2001@phpclub.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Class Destruction / Reloading From: zeev@zend.com (Zeev Suraski) At 08:32 19/08/2004, Sara Golemon wrote: > > Well, some time ago I wrote a small functions, that does exactly the same: > > > > PHP_FUNCTION(unregister_class) > > { >*snip* > >Barring some stylectic differences and a check to make sure it's not an >internal class, that's precisely what I gave sean in >shiva_destroy_class().... > >But just to be clear, I don't think it's a good idea, and I'll wager dollars >to doughnuts that it destablizes the active request if not the entire >engine. From the technical perspective, it's actually easy to implement in a rock-solid manner. Don't kill the class completely but just clean any functions/properties inside of it, and mark it as dead. Then patch the class declaration begin code to check for this flag, and reuse the class structure instead of complaining about reregistering a class. There might be some more cleanup necessary in PHP 5, but if any, it shouldn't be too complicated. But I agree with you that it's a bad idea :) Zeev