xref: /PHP-8.3/Zend/tests/gh13446_2.phpt (revision 3301d960)
1--TEST--
2GH-13446: Exception handler attempting to free itself
3--FILE--
4<?php
5$x = new \stdClass();
6$handler = function ($ex) use (&$handler, $x) {
7    $handler = null;
8    var_dump($x);
9};
10unset($x);
11set_exception_handler($handler);
12throw new Exception('Unhandled');
13?>
14--EXPECT--
15object(stdClass)#1 (0) {
16}
17