You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gc_collect_cycles() must return the number of cyclic zvals collected in the GC run. Zend returns 0 when the only cleanup is a normal __destruct from refcount dropping to zero (no cycles). This compiler's CycleCollector::collect() returns 1 in that scenario.
Category
stdlib·runtime· php-src-strictProblem
gc_collect_cycles()must return the number of cyclic zvals collected in the GC run. Zend returns 0 when the only cleanup is a normal__destructfrom refcount dropping to zero (no cycles). This compiler'sCycleCollector::collect()returns 1 in that scenario.php-src reference
Zend/zend_gc.c—gc_collect_cycles,gc_remove_from_bufferext/standard/info.c—PHP_FUNCTION(gc_collect_cycles)Repro (verified 2026-06-19)
test/repro/maintainer_gap_architect_run/probe_gc_collect.php:dtorthen0dtorthen1Scope
lib/VM/CycleCollector.php— return count semanticsext/standard/gc_collect_cycles.php— VM builtin returnext/standard/GcCollectCyclesJitHelper.php/ JIT path — match VM counttest/compliance/cases/runtime/gc_collect_cycles_return.phptPHP-in-PHP: fix in
CycleCollectorPHP; shrink any duplicate counting in LLVM per #9269 / #10087.Done when
0after dtor on VM (php-src-strict)test/compliance/cases/runtime/gc_collect_cycles.phpt)./script/ci-fast.sh --filter gc_collect_cyclesgreenRelated