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
22 lines
423 B
PHP
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
|