xref: /PHP-8.2/Zend/tests/bug78999.phpt (revision 7aacc705)
1--TEST--
2Bug #78999 (Cycle leak when using function result as temporary)
3--FILE--
4<?php
5function get() {
6    $t = new stdClass;
7    $t->prop = $t;
8    return $t;
9}
10var_dump(get());
11var_dump(gc_collect_cycles());
12?>
13--EXPECT--
14object(stdClass)#1 (1) {
15  ["prop"]=>
16  *RECURSION*
17}
18int(1)
19