Forces collection of any existing garbage cycles

# gc_collect_cycles

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

gc_collect_cycles — Forces collection of any existing garbage cycles

### Description

function gc_collect_cycles(): int

Forces collection of any existing garbage cycles.

### Parameters

This function has no parameters.

### Return Values

Returns number of collected cycles.

### Changelog

Version | Description
--- | ---
8.5.0 | The return value no longer includes strings and resources that were indirectly collected through cycles.

### See Also

- Garbage Collection

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open