bug60909_1.phpt 646 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
  3. --FILE--
  4. <?php
  5. register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
  6. set_error_handler(function($errno, $errstr, $errfile, $errline){
  7. echo "error($errstr)";
  8. throw new Exception("Foo");
  9. });
  10. require 'notfound.php';
  11. ?>
  12. --EXPECTF--
  13. error(require(notfound.php): Failed to open stream: %s)
  14. Fatal error: Uncaught Exception: Foo in %sbug60909_1.php:5
  15. Stack trace:
  16. #0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8)
  17. #1 %sbug60909_1.php(8): require()
  18. #2 {main}
  19. thrown in %sbug60909_1.php on line 5
  20. !!!shutdown!!!