note 79493 deleted from function.register-shutdown-function by cmb
| From: | cmb@php.net | Date: | Sun, 03 Feb 2019 18:05:28 +0000 |
| Subject: | note 79493 deleted from function.register-shutdown-function by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210181@lists.php.net to get a copy of this message | ||
Note Submitter: boutell round-about boutell dhot com
----
According to tests shown in this comment on the PHP5 deconstructor page:
http://us3.php.net/manual/en/language.oop5.decon.php#76710
Functions registered with register_shutdown_function are called before deconstructors, at least as
of PHP 5.2.1. This contradicts an earlier commenter who claims that objects cannot be utilized in
functions called from register_shutdown_function. This is good news for those who want to use
register_shutdown_function to work around the (fairly nasty) problems with using objects in a
session write handler.