note 14399 deleted from class.pear by nlopess

From: Date: Fri, 25 Jun 2004 16:50:27 +0000
Subject: note 14399 deleted from class.pear by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71680@lists.php.net to get a copy of this message
Note Submitter: tychay@mac.com ---- One thing not mentioned in the manual (but noted in the source code of PEAR) is that in order for the destructor to work correctly in a subclass, you need to make sure you call $this->PEAR() in the constructor of your subclass. This is so that the function called by register_shutdown_function() calls the destructor you created. It is also recommended that your destructor call $this->_PEAR(). Note that since the function doesn't actually do anything right now it isn't recommended. However this will probably patch a "bug" in PEAR in the future. Namely, if you call the destructor manually, right now, PEAR doesn't remove the destructor callback from its list (for those who care, it is the global $_PEAR_destructor_object_list), so it will get called again when the PHP application shuts down. Of course, since all this occurs after the output to the client has been closed, none of these errors will be output to the browser. :-) -terry chay

« previous php.notes (#71680) next »