xref: /PHP-5.4/Zend/tests/bug60909_1.phpt (revision c6203da6)
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--EXPECTF--
13error(require(notfound.php): failed to open stream: %s)
14Warning: Uncaught exception 'Exception' with message 'Foo' in %sbug60909_1.php:5
15Stack trace:
16#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
17#1 %sbug60909_1.php(8): require()
18#2 {main}
19  thrown in %sbug60909_1.php on line 5
20
21Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8
22
23
24!!!shutdown!!!
25