summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_037.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/gc_037.phpt')
-rw-r--r--Zend/tests/gc_037.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/Zend/tests/gc_037.phpt b/Zend/tests/gc_037.phpt
new file mode 100644
index 0000000000..fc60bcab29
--- /dev/null
+++ b/Zend/tests/gc_037.phpt
@@ -0,0 +1,30 @@
+--TEST--
+GC 037: gc_status()
+--INI--
+zend.enable_gc = 1
+--FILE--
+<?php
+var_dump(gc_status());
+$a = array();
+$a[] =& $a;
+unset($a);
+gc_collect_cycles();
+gc_collect_cycles();
+var_dump(gc_status());
+--EXPECT--
+array(3) {
+ ["gc_runs"]=>
+ int(0)
+ ["collected"]=>
+ int(0)
+ ["gc_threshold"]=>
+ int(10001)
+}
+array(3) {
+ ["gc_runs"]=>
+ int(1)
+ ["collected"]=>
+ int(1)
+ ["gc_threshold"]=>
+ int(10001)
+}