Repository navigation
fix(optimizer): preserve php semantics in native shortcuts - #2247
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the PHP-visible regressions and remaining audit findings from #2090.
mb_str_pad()andmb_convert_case()argument errors, source evaluation order and correct padding error names. Limit native multibyte padding to integer length/mode operands, preserving TypeErrors and accepted weak numeric-string coercions through the bridge. Treat multibyte trim masks as literal characters and remove the compiler debug print.count()'s TypeError.explode()diagnostic when count fusion cannot prove scalar coercion.mb_convert_variables()updates toillegal_chars. Progressive native searches, includingmb_ereg_search_pos()andmb_ereg_search_regs(), honor live configured limits and deliver diagnostics through the ordinary callback bridge.Validation:
The local runtime comparison retains 3.38x
array_sum, 3.60xsum_loopand 1.25x indexed-array speedups versus immediate pre-merge main. Dense validation reduces the opaque-eval debug compile median from 37.0s to 32.5s. The recorded release compiler comparison for that probe still costs +3.3% with IR optimization on and +11.8% with it off; the report preserves this remaining cost and measurement variation. Four selected benchmark assembly files are identical before/after the validator change.The pre-existing Stringable limitation in
explode()remains: its count-fusion fix restores the original diagnostic. Full supported-target execution coverage runs in CI, withci:macosenabled.