xref: /PHP-8.2/Zend/tests/gc_037.phpt (revision 7aacc705)
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?>
15--EXPECT--
16array(4) {
17  ["runs"]=>
18  int(0)
19  ["collected"]=>
20  int(0)
21  ["threshold"]=>
22  int(10001)
23  ["roots"]=>
24  int(1)
25}
26array(4) {
27  ["runs"]=>
28  int(1)
29  ["collected"]=>
30  int(1)
31  ["threshold"]=>
32  int(10001)
33  ["roots"]=>
34  int(0)
35}
36