gc_enabled
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
Returns status of the circular reference collector
Description
gc_enabled(): bool
Returns status of the circular reference collector.
Parameters Parameters
Return Values
Returns true if the garbage collector is enabled, false otherwise.
Examples
A gc_enabled() example
php
<?php
if(gc_enabled()) gc_collect_cycles();
?>