Re: Obsoleting PEAR.php

From: Date: Sat, 17 May 2003 00:09:28 +0000
Subject: Re: Obsoleting PEAR.php
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16388@lists.php.net to get a copy of this message
On Fri, May 16, 2003 at 04:54:33PM -0400, Sterling Hughes wrote: > > And it's easy to implement destructors manually: > > > > function Foo() > > { > > register_shutdown_function(array(&$this, '_Foo')); > > } > > > > function _Foo() > > { > > // destroy > > } > > Well, not exactly. The reason for PEAR's destructor framework is so > that multiple PEAR libraries can have destructors. Sure, but that shouldn't be a problem with the above code. According to the register_shutdown_function() section of the manual[1]: Multiple calls to register_shutdown_function() can be made, and each will be called in the same order as they were registered. [1] http://www.php.net/manual/en/function.register-shutdown-function.php -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.pear.dev (#16388) next »