bug63206.phpt 582 B

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