mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
b3e33be443
Fixes GH-10695 Closes GH-110905
17 lines
418 B
PHP
17 lines
418 B
PHP
--TEST--
|
|
GH-10695: Exceptions in register_shutdown_function() are caught by set_exception_handler()
|
|
--FILE--
|
|
<?php
|
|
set_exception_handler(function (\Throwable $exception) {
|
|
echo 'Caught: ' . $exception->getMessage() . "\n";
|
|
});
|
|
|
|
register_shutdown_function(function () {
|
|
echo "register_shutdown_function()\n";
|
|
throw new \Exception('shutdown');
|
|
});
|
|
?>
|
|
--EXPECT--
|
|
register_shutdown_function()
|
|
Caught: shutdown
|