mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
19 lines
224 B
PHP
19 lines
224 B
PHP
--TEST--
|
|
GC 015: Object as root of cycle
|
|
--FILE--
|
|
<?php
|
|
$a = new stdClass();
|
|
$c =& $a;
|
|
$b = $a;
|
|
$a->a = $a;
|
|
$a->b = "xxx";
|
|
unset($c);
|
|
unset($a);
|
|
unset($b);
|
|
var_dump(gc_collect_cycles());
|
|
echo "ok\n";
|
|
?>
|
|
--EXPECT--
|
|
int(2)
|
|
ok
|