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