1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
--TEST--
Bug #41037 (unregister_tick_function() inside the tick function crash PHP)
--FILE--
<?php
function a() {
echo "hello\n";
try {
unregister_tick_function('a');
} catch (Error $exception) {
echo $exception->getMessage() . "\n";
}
}
declare (ticks=1) {
register_tick_function('a');
echo "Done\n";
}
?>
--EXPECT--
hello
Registered tick function cannot be unregistered while it is being executed
Done
hello
Registered tick function cannot be unregistered while it is being executed
|