note 109534 added to function.unregister-tick-function
| From: | Greg | Date: | Fri, 27 Jul 2012 00:02:21 +0000 |
| Subject: | note 109534 added to function.unregister-tick-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189412@lists.php.net to get a copy of this message | ||
It's not so clear, but, at least as of PHP 5.3.13, you cannot use this inside of the handler
itself as it will throw an error:
<?php
declare(ticks=2);
function tick_handler()
{
unregister_tick_function('tick_handler');
}
register_tick_function('tick_handler');
set_time_limit(0);
usleep(500000);
?>
results in:
warning: unregister_tick_function(): Unable to delete tick function executed at the moment in
[filename]
So if you want to unregister it must be done outside of the handler.
----
Server IP: 69.147.83.197
Probable Submitter: 74.141.242.55
----
Manual Page -- http://www.php.net/manual/en/function.unregister-tick-function.php
Edit -- https://master.php.net/note/edit/109534
Del: integrated -- https://master.php.net/note/delete/109534/integrated
Del: useless -- https://master.php.net/note/delete/109534/useless
Del: bad code -- https://master.php.net/note/delete/109534/bad+code
Del: spam -- https://master.php.net/note/delete/109534/spam
Del: non-english -- https://master.php.net/note/delete/109534/non-english
Del: in docs -- https://master.php.net/note/delete/109534/in+docs
Del: other reasons-- https://master.php.net/note/delete/109534
Reject -- https://master.php.net/note/reject/109534
Search -- https://master.php.net/manage/user-notes.php