bug60909_1.phpt 783 B

123456789101112131415161718192021222324
  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. --EXPECTF--
  12. error(require(notfound.php): failed to open stream: %s)
  13. Warning: Uncaught exception 'Exception' with message 'Foo' in %sbug60909_1.php:5
  14. Stack trace:
  15. #0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
  16. #1 %sbug60909_1.php(8): require()
  17. #2 {main}
  18. thrown in %sbug60909_1.php on line 5
  19. Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8
  20. !!!shutdown!!!