Stdlib: AOT mb_trim() honors runtime encoding (#35199) - #35202
Merged
Merged
Conversation
NestedJIT assertEncodingArgv (peer #35193); preserve isNullConstant on ConstFetch null first-bind so default $characters works. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Aug 26, 2026
Fingerprint drift after #35202 left 1/414 committed helpers stale (blocks user_release_ready); republish only that unit — no whole-corpus restamp. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks done
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.
Summary
assertEncodingArgvformb_trim/mb_ltrim/mb_rtrimruntime encoding (peer AOT: mb_convert_kana() refuses runtime encoding — LogicException (leftover of #34294, ext/mbstring/mbstring.c) #35193 / AOT: mb_scrub() refuses runtime encoding — LogicException (leftover of #34338, ext/mbstring/mbstring.c) #35161); no newruntime/*.c.isNullConstanton ConstFetch-null first-bind (assignOperand) somb_trim($s, null, enc(...))keeps default$characters.ext/mbstring/mbstring.cPHP_FUNCTION(mb_trim).Test plan
./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_PROFILE=8.4 PHP_COMPILER_HELPER_RUNTIME_O=0; php bin/vm.php test/repro/aot_mb_trim_runtime_encoding.php; php bin/compile.php -o /tmp/mbtrim.bin test/repro/aot_mb_trim_runtime_encoding.php && /tmp/mbtrim.bin'— VM=AOT (utf8/ascii/bit/literal/chars+ValueErroronnope)./script/phpunit.sh --filter MbTrimRuntimeEncodingAotTest— OK (2 tests, 13 assertions)./script/aot-smoke.sh— 8/8MbTrimRuntimeAotTest(NBSP NestedJIT, AOT: mb_trim/mb_ltrim/mb_rtrim refuse runtime strings — LogicException (leftover of #5957/#23883, ext/mbstring/mbstring.c) #34379) already mismatches VM on HEAD withHELPER_RUNTIME_O=0; not regressed by this PR’s encoding path.Made with Cursor