summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_015.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-01-22 09:27:48 +0000
committerDmitry Stogov <dmitry@php.net>2008-01-22 09:27:48 +0000
commit71592cec0684d376df3fc91645e98fb9679edcd5 (patch)
tree7d05ba19e5e467fcab54952c23b8069275394803 /Zend/tests/gc_015.phpt
parent2be1ae5415f3087b662ac9ba6f84bb82db59c0d2 (diff)
downloadphp-git-71592cec0684d376df3fc91645e98fb9679edcd5.tar.gz
Added garbage collector
Diffstat (limited to 'Zend/tests/gc_015.phpt')
-rw-r--r--Zend/tests/gc_015.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/gc_015.phpt b/Zend/tests/gc_015.phpt
new file mode 100644
index 0000000000..76db51e7fd
--- /dev/null
+++ b/Zend/tests/gc_015.phpt
@@ -0,0 +1,18 @@
+--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