1--TEST--
2Exception during WeakMap destruction during shutdown
3--FILE--
4<?php
5$map = new WeakMap;
6$obj = new stdClass;
7$map[$obj] = new class {
8    function __destruct() {
9        throw new Exception("Test");
10    }
11};
12?>
13--EXPECTF--
14Fatal error: Uncaught Exception: Test in %s:%d
15Stack trace:
16#0 [internal function]: class@anonymous->__destruct()
17#1 {main}
18  thrown in %s on line %d
19