note 28973 added to function.register-shutdown-function

From: Date: Wed, 29 Jan 2003 13:53:20 +0000
Subject: note 28973 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-43072@lists.php.net to get a copy of this message
One more note to add about register_shutdown_function and objects. It is possible to self-register the object from the constructor, but even using the syntax: register_shutdown_function(array(&$this,'shutdown')) will only result in the function being called with the object in the "just initialized" state, any changes made to the object after construction will not be there when the script actually exits. But if you use: $obj = new object(); register_shutdown_function(array(&$obj,'shutdown')); the object method 'shutdown' will be called with the current state of the object intact. -- http://www.php.net/manual/en/function.register-shutdown-function.php http://master.php.net/manage/user-notes.php?action=edit+28973 http://master.php.net/manage/user-notes.php?action=delete+28973 http://master.php.net/manage/user-notes.php?action=reject+28973

« previous php.notes (#43072) next »