mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
First pass at moving `Zend/tests/gh*` tests to existing sub directories Work towards GH-15631
17 lines
407 B
PHP
17 lines
407 B
PHP
--TEST--
|
|
GH-10695: Exceptions in error handlers during shutdown are caught
|
|
--FILE--
|
|
<?php
|
|
set_exception_handler(function (\Throwable $exception) {
|
|
echo 'Caught: ' . $exception->getMessage() . "\n";
|
|
});
|
|
set_error_handler(function ($errno, $errstr) {
|
|
throw new \Exception($errstr);
|
|
});
|
|
register_shutdown_function(function () {
|
|
trigger_error('main', E_USER_WARNING);
|
|
});
|
|
?>
|
|
--EXPECT--
|
|
Caught: main
|