note 34516 deleted from function.register-shutdown-function by didou
| From: | didou@php.net | Date: | Wed, 30 Jul 2003 19:18:05 +0000 |
| Subject: | note 34516 deleted from function.register-shutdown-function by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53032@lists.php.net to get a copy of this message | ||
Note Submitter: Mocha
----
Using the snip:
---
class Object {
var $somevar = "foo";
function Object() {
$somevar = "bar";
register_shutdown_function(array(&$this, 'MyDestructor'));
}
function MyDestructor() {
# Do useful destructor stuff here...
}
}
# Now create the object as follows and then 'MyDestructor'
# will be called on shutdown and will be able to operate on
# the object as it ended up... not as it started!
$my_object =& new Object;
---
Gives me this error:
---
Warning: Unknown(): Unable to call Array() - function does not exist in Unknown on line 0
---
Tested on PHP-4.3.2