php-src/Zend/tests/gc_008.phpt

24 lines
332 B
Plaintext
Raw Normal View History

2008-01-22 09:27:48 +00:00
--TEST--
GC 008: Unreferenced object cycle
2010-03-03 17:53:15 +00:00
--INI--
zend.enable_gc=1
2008-01-22 09:27:48 +00:00
--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"
?>
--EXPECTF--
object(stdClass)#%d (1) {
2008-01-22 09:27:48 +00:00
["a"]=>
*RECURSION*
2008-01-22 09:27:48 +00:00
}
int(0)
int(1)
ok