mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
b3e33be443
Fixes GH-10695 Closes GH-110905
19 lines
360 B
PHP
19 lines
360 B
PHP
--TEST--
|
|
GH-10695: Exceptions in destructor during shutdown are caught
|
|
--FILE--
|
|
<?php
|
|
class Foo {
|
|
public function __destruct() {
|
|
throw new \Exception(__METHOD__);
|
|
}
|
|
}
|
|
|
|
set_exception_handler(function (\Throwable $exception) {
|
|
echo 'Caught: ' . $exception->getMessage() . "\n";
|
|
});
|
|
|
|
const FOO = new Foo;
|
|
?>
|
|
--EXPECT--
|
|
Caught: Foo::__destruct
|