xref: /PHP-7.4/Zend/tests/gc_037.phpt (revision 9465ec46)
1--TEST--
2GC 037: gc_status()
3--INI--
4zend.enable_gc = 1
5--FILE--
6<?php
7$a = array();
8$a[] =& $a;
9unset($a);
10var_dump(gc_status());
11gc_collect_cycles();
12gc_collect_cycles();
13var_dump(gc_status());
14--EXPECT--
15array(4) {
16  ["runs"]=>
17  int(0)
18  ["collected"]=>
19  int(0)
20  ["threshold"]=>
21  int(10001)
22  ["roots"]=>
23  int(1)
24}
25array(4) {
26  ["runs"]=>
27  int(1)
28  ["collected"]=>
29  int(1)
30  ["threshold"]=>
31  int(10001)
32  ["roots"]=>
33  int(0)
34}
35