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