xref: /PHP-8.2/Zend/tests/generators/bug76427.phpt (revision f8d79582)
1--TEST--
2Bug #76427 (Segfault in zend_objects_store_put)
3--FILE--
4<?php
5$func = function () {
6    yield 2;
7};
8
9$a  = new stdclass();
10$b =  new stdclass();
11$a->b = $b;
12$b->a = $a;
13
14$func = $a->func = $func();
15
16unset($b);
17unset($a);
18unset($func);
19
20var_dump(gc_collect_cycles());
21
22?>
23--EXPECT--
24int(2)
25