xref: /php-src/Zend/tests/gc_037.phpt (revision d0731934)
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--EXPECTF--
16array(12) {
17  ["running"]=>
18  bool(false)
19  ["protected"]=>
20  bool(false)
21  ["full"]=>
22  bool(false)
23  ["runs"]=>
24  int(0)
25  ["collected"]=>
26  int(0)
27  ["threshold"]=>
28  int(10001)
29  ["buffer_size"]=>
30  int(16384)
31  ["roots"]=>
32  int(1)
33  ["application_time"]=>
34  float(%f)
35  ["collector_time"]=>
36  float(%f)
37  ["destructor_time"]=>
38  float(%f)
39  ["free_time"]=>
40  float(%f)
41}
42array(12) {
43  ["running"]=>
44  bool(false)
45  ["protected"]=>
46  bool(false)
47  ["full"]=>
48  bool(false)
49  ["runs"]=>
50  int(1)
51  ["collected"]=>
52  int(1)
53  ["threshold"]=>
54  int(10001)
55  ["buffer_size"]=>
56  int(16384)
57  ["roots"]=>
58  int(0)
59  ["application_time"]=>
60  float(%f)
61  ["collector_time"]=>
62  float(%f)
63  ["destructor_time"]=>
64  float(%f)
65  ["free_time"]=>
66  float(%f)
67}
68