php-src/Zend/tests/gc_008.phpt
2008-01-22 09:27:48 +00:00

25 lines
350 B
PHP

--TEST--
GC 008: Unreferensed object cycle
--FILE--
<?php
$a = new stdClass();
$a->a = new stdClass();
$a->a->a = $a->a;
var_dump($a->a);
var_dump(gc_collect_cycles());
unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
--EXPECT--
object(stdClass)#2 (1) {
["a"]=>
object(stdClass)#2 (1) {
["a"]=>
*RECURSION*
}
}
int(0)
int(1)
ok