gc_enabled

(PHP 5 >= 5.3.0, PHP 7)
Returns status of the circular reference collector
bool gc_enabled ( void )

Returns status of the circular reference collector.

Returns:

Returns TRUE if the garbage collector is enabled, FALSE otherwise.

Examples:
A gc_enabled() example
<?php
if(gc_enabled()) gc_collect_cycles();
?>

See also:

Garbage Collection -

doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.