]> granicus.if.org Git - php/blob
6aba55eca1
[php] /
1 --TEST--
2 Bug #63206 Fully support error_handler stacking, even inside the error_handler
3 --FILE--
4 <?php
5
6 set_error_handler(function() {
7     echo 'First handler' . PHP_EOL;
8 });
9
10 set_error_handler(function() {
11     echo 'Second handler' . PHP_EOL;
12
13     set_error_handler(function() {
14         echo 'Internal handler' . PHP_EOL;
15     });
16
17     $triggerInternalNotice++; // warnings while handling the error should go into internal handler
18
19     restore_error_handler();
20 });
21
22 $triggerNotice1++;
23 $triggerNotice2++;
24 ?>
25 --EXPECT--
26 Second handler
27 Internal handler
28 Second handler
29 Internal handler