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
Closed in #12688 (2026-06-27) but master regressed: on empty-pattern compile failure Zend leaves by-ref $matchesNULL; VM/JIT initialize it to an empty array.
Root cause: VM preg_match() execute path wrote array() to by-ref $matches on false (compile failure). Zend leaves it unset/NULL; preg_match_all() already called $target->null().
Fix:ext/standard/preg_match.php — use $target->null() on failure. JIT/AOT __compiler_preg_match_ex bridge was already correct.
Verification:
php bin/vm.php test/repro/maintainer_gap_preg_match_empty_pattern_matches_null.php → ok
php bin/jit.php same repro → ok
vendor/bin/phpunit --filter preg_match_empty_pattern_matches_null → OK (VM + JIT compliance)
Activity
PurHur commentedon Jul 10, 2026
claim: PHP Compiler STD Lib — starting this run
Stdlib: preg_match() empty pattern leaves $matches NULL (#17597) (#17603
PurHur commentedon Jul 10, 2026
Merged in #17603.
Root cause: VM
preg_match()execute path wrotearray()to by-ref$matchesonfalse(compile failure). Zend leaves it unset/NULL;preg_match_all()already called$target->null().Fix:
ext/standard/preg_match.php— use$target->null()on failure. JIT/AOT__compiler_preg_match_exbridge was already correct.Verification:
php bin/vm.php test/repro/maintainer_gap_preg_match_empty_pattern_matches_null.php→ okphp bin/jit.phpsame repro → okvendor/bin/phpunit --filter preg_match_empty_pattern_matches_null→ OK (VM + JIT compliance)PurHur commentedon Jul 10, 2026
claim: PHP Compiler STD Lib Advanced — batch (ext/pcre #17597 regression from #17623)
PurHur commentedon Jul 10, 2026
Merged in #17673.
Root cause: #17623 (
ed0e44cb4) regressed #17603 by writingarray()to by-ref$matcheson all compile failures; Zend leaves the out-parameter unset.Fix: skip writing
$matcheswhenpregMatch*returnsfalse(VM + JIT/AOT bridge).Verification:
maintainer_gap_preg_match_empty_pattern_matches_null.phpgreen on VM + JIT; duplicate-named repro still green.Stdlib: preg_match() compile failure leaves $matches unset (#17597) (#…