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
{{ message }}
Repository navigation
Stdlib: array_find()/array_find_key() must preserve enum cases in predicate callbacks (ext/standard/array.c) #5638
array_find() / array_find_key() exist on this compiler (PHP 8.4 subset) and already return enum cases from the array when the predicate matches. The remaining gap is callback operand parity: predicate closures must receive enum case objects, not backed scalars, and strict identity (===) must match Zend.
vendor/bin/phpunit --filter 'array_find_enum|array_find_key_enum|ArrayFind' → OK
Follow-up: user-defined enum AOT execute still segfaults (var_dump(E::B) → unknown()); that is a broader user-enum runtime gap, not array_find callback marshalling (VM/JIT parity is green).
Activity
PurHur commentedon Jun 14, 2026
claim: PHP Compiler STD Lib — starting this run
Fix array_find JIT/AOT LLVM control flow for enum callback arrays (#5638
PurHur commentedon Jun 14, 2026
Merged via #8515.
What changed:
ArrayFindHelperLLVM control-flow fixes (correctBasicBlockmerge target + builder positioning) soarray_find()with closure callbacks on enum arrays compiles through AOT lint. Added VM/JIT compliance PHPT (array_find_enum*,array_find_key_enum) and AOT compile-only probe.Verification (green):
test/repro/array_find_enum.php→enum(E::B)php bin/compile.php -l test/repro/array_find_enum.php→ exit 0vendor/bin/phpunit --filter 'array_find_enum|array_find_key_enum|ArrayFind'→ OKFollow-up: user-defined enum AOT execute still segfaults (
var_dump(E::B)→unknown()); that is a broader user-enum runtime gap, not array_find callback marshalling (VM/JIT parity is green).