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