Skip to content

Regression: mb_chr/mb_ord Reflection params empty — Zend codepoint/string; named args rejected (ext/mbstring/mbstring.stub.php) #23291

Description

@PurHur

Category

bug · php-src-strict · named arguments / Reflection

Problem

mb_chr / mb_ord work positionally, but Reflection exposes zero parameters, so Zend stub named calls fail. Probed 2026-07-26 vs host Zend 8.2.32.

Repro Zend 8.2 VM (2026-07-26)
Reflection mb_chr codepoint,encoding empty
Reflection mb_ord string,encoding empty
mb_chr(codepoint:0x41) A Unknown named parameter $codepoint
mb_ord(string:'A') 65 Unknown named parameter $string

Related empty Reflection in same extension (optional same PR): mb_scrub, mb_str_split.

php-src reference

PHP implementation target

  • lib/BuiltinParamNames.php — stub names
  • Existing PHP impl: ext/mbstring/ (mb_chr, mb_ord); PHP-in-PHP only; no new C

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''try { echo mb_chr(codepoint:0x41), "\n"; echo mb_ord(string:"A"), "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; }'\'''

Done when

  • Reflection names match Zend for mb_chr / mb_ord
  • Zend-style named calls match Zend on VM
  • Compliance .phpt + test/repro/issue_NNNN_*.php
  • php-src-strict; no php-compiler-strict shortcut

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions