mirror of
https://github.com/php/php-src.git
synced 2025-01-18 17:54:05 +08:00
22 lines
273 B
PHP
22 lines
273 B
PHP
--TEST--
|
|
GC 005: Simple object cycle
|
|
--FILE--
|
|
<?php
|
|
$a = new stdClass();
|
|
$a->a = $a;
|
|
var_dump($a);
|
|
unset($a);
|
|
var_dump(gc_collect_cycles());
|
|
echo "ok\n"
|
|
?>
|
|
--EXPECT--
|
|
object(stdClass)#1 (1) {
|
|
["a"]=>
|
|
object(stdClass)#1 (1) {
|
|
["a"]=>
|
|
*RECURSION*
|
|
}
|
|
}
|
|
int(1)
|
|
ok
|