note 77027 deleted from function.register-shutdown-function by crell
| From: | crell@php.net | Date: | Thu, 31 Mar 2022 17:06:02 +0000 |
| Subject: | note 77027 deleted from function.register-shutdown-function by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217856@lists.php.net to get a copy of this message | ||
Note Submitter: Sinured
----
You can use a static method of a class as a shutdown function without passing an instance. I think
that doesn't make too much sense, however it's possible.
<?php
register_shutdown_function('someClass::someMethod');
?>
If this method is *NOT* static, then PHP will complain about an invalid callback instead of just
emitting an E_STRICT error.