note 77027 added to function.register-shutdown-function
| From: | Sinured at osu1 dot php dot net | Date: | Sat, 11 Aug 2007 01:26:00 +0000 |
| Subject: | note 77027 added to function.register-shutdown-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129408@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 217.13.201.10
Probable Submitter: 172.179.83.31
----
Manual Page -- http://www.php.net/manual/en/function.register-shutdown-function.php
Edit -- https://master.php.net/note/edit/77027
Del: integrated -- https://master.php.net/note/delete/77027/integrated
Del: useless -- https://master.php.net/note/delete/77027/useless
Del: bad code -- https://master.php.net/note/delete/77027/bad+code
Del: spam -- https://master.php.net/note/delete/77027/spam
Del: non-english -- https://master.php.net/note/delete/77027/non-english
Del: in docs -- https://master.php.net/note/delete/77027/in+docs
Del: other reasons-- https://master.php.net/note/delete/77027
Reject -- https://master.php.net/note/reject/77027
Search -- https://master.php.net/manage/user-notes.php