|
gc_statusGets information about the garbage collector Description
array gc_status()
Gets information about the current state of the garbage collector. ParametersThis function has no parameters. Return ValuesReturns an associative array with the following elements:
Changelog
Examples
Example #1 gc_status Usage
The above example will output something similar to: array(4) { ["runs"]=> int(5) ["collected"]=> int(100002) ["threshold"]=> int(50001) ["roots"]=> int(0) } Output of the above example in PHP 8.3 is similar to: array(12) { ["running"]=> bool(false) ["protected"]=> bool(false) ["full"]=> bool(false) ["runs"]=> int(5) ["collected"]=> int(100002) ["threshold"]=> int(50001) ["buffer_size"]=> int(131072) ["roots"]=> int(0) ["application_time"]=> float(0.031182458) ["collector_time"]=> float(0.020106291) ["destructor_time"]=> float(0) ["free_time"]=> float(0.003707167) } |