1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/exceptions/gh13446_4.phpt
DanielEScherzer a81649f992 Zend/tests: organize some tests with sub directories (4) (#17778)
First pass at moving `Zend/tests/gh*` tests to existing sub directories

Work towards GH-15631
2025-02-13 16:17:36 +00:00

22 lines
423 B
PHP

--TEST--
GH-13446: Exception handler isn't restored if stack is empty
--FILE--
<?php
function exception_handler() {
echo "Handler\n";
restore_exception_handler();
restore_exception_handler();
}
set_exception_handler('exception_handler');
register_shutdown_function(function () {
var_dump(set_exception_handler(null));
restore_exception_handler();
});
throw new Exception();
?>
--EXPECT--
Handler
NULL