php8.5
Home/ Manual/ info / functions/ gc_collect_cycles

gc_collect_cycles

PHP function Edit on GitHub ✎

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

Forces collection of any existing garbage cycles

Description

gc_collect_cycles(): int

Forces collection of any existing garbage cycles.

Parameters Parameters

Return Values

Returns number of collected cycles.

Changelog

VersionDescription
8.5.0The return value no longer includes strings and resources that were indirectly collected through cycles.

See Also

Source: reference/info/functions/gc-collect-cycles.xml · from the official PHP manual (php/doc-en)