Skip to content

Stdlib: AOT mb_substr_count() runtime encoding via NestedJIT (#35155) - #35157

Merged
PurHur merged 1 commit into
masterfrom
fix/35155-mb-substr-count-runtime-encoding
Aug 26, 2026
Merged

Stdlib: AOT mb_substr_count() runtime encoding via NestedJIT (#35155)#35157
PurHur merged 1 commit into
masterfrom
fix/35155-mb-substr-count-runtime-encoding

Conversation

@PurHur

@PurHur PurHur commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

php-src

Test plan

  • ./script/aot-smoke.sh8 passed, 0 failed
  • Issue repro (Zend / VM / AOT identical):
    count=3
    ascii=3
    jp=2
    bad_enc=mb_substr_count(): Argument #3 ($encoding) must be a valid encoding, "nope" given
    
  • ./script/phpunit.sh --filter MbSubstrCountRuntimeAotTestOK (3 tests, 19 assertions)

Made with Cursor

Encoding still required a compile-time literal while peers (mb_strwidth /
mb_convert_case TITLE) already accept runtime strings. Wire
assertEncodingArgv (Argument #3) like the #34884 peer wave.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 0c0eeea into master Aug 26, 2026
@PurHur
PurHur deleted the fix/35155-mb-substr-count-runtime-encoding branch August 26, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT: mb_substr_count() refuses runtime encoding — LogicException (leftover of #4637, ext/mbstring/mbstring.c)

1 participant