PHP 8.5 introduces garbage collection optimizations that exclude enums and static fake closures (first-class callables) from cycle collection checks. These types cannot have cyclic references, so marking them as non-collectable prevents unnecessary GC runs. The improvement is particularly impactful when dealing with large

Sort: