ru_php/Zend/tests/weakrefs/weakmap_dtor_exception.phpt

19 lines
382 B
Plaintext
Raw Permalink Normal View History

--TEST--
Exception during WeakMap destruction during shutdown
--FILE--
<?php
$map = new WeakMap;
$obj = new stdClass;
$map[$obj] = new class {
function __destruct() {
throw new Exception("Test");
}
};
?>
--EXPECTF--
Fatal error: Uncaught Exception: Test in %s:%d
Stack trace:
#0 [internal function]: class@anonymous->__destruct()
#1 {main}
thrown in %s on line %d