xref: /PHP-7.3/Zend/tests/bug78999.phpt (revision eb846939)
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--EXPECT--
13object(stdClass)#1 (1) {
14  ["prop"]=>
15  *RECURSION*
16}
17int(1)
18