Category
stdlib · php-src-strict · forward-profile phantom gate regression (re-#16776, re-#16086)
Problem
On the default Zend 8.2 reference profile, mb_str_pad() must be absent from function_exists() until PHP 8.3+ / explicit forward profile. This compiler advertises it on the reference profile because CompilerVersion::advertisesMbStrPad() keys off languageProfileVersion() (8.4.0) while CompilerVersion::VERSION is still 8.4.0-dev.
| Repro |
Zend 8.2 |
VM reference profile (2026-07-09) |
function_exists('mb_str_pad') |
false |
true |
Callable behavior with PHP_COMPILER_PROFILE=8.4 is fine — this issue is introspection / phantom gate on reference profile only.
php-src reference
PHP implementation target
lib/CompilerVersion.php — advertisesMbStrPad() / supportsMbStrPad() gate on stable runtime or explicit forward profile
ext/mbstring/Module.php or BuiltinIntrospectionPolicy — withhold mb_str_pad from function_exists() on reference profile
ext/mbstring/mb_str_pad.php — implementation unchanged; registration/policy only
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_gap_mb_str_pad_phantom_reference.php'
Done when
North star: #1492 · closed #16776 regressed
Category
stdlib· php-src-strict · forward-profile phantom gate regression (re-#16776, re-#16086)Problem
On the default Zend 8.2 reference profile,
mb_str_pad()must be absent fromfunction_exists()until PHP 8.3+ / explicit forward profile. This compiler advertises it on the reference profile becauseCompilerVersion::advertisesMbStrPad()keys offlanguageProfileVersion()(8.4.0) whileCompilerVersion::VERSIONis still8.4.0-dev.function_exists('mb_str_pad')falsetrueCallable behavior with
PHP_COMPILER_PROFILE=8.4is fine — this issue is introspection / phantom gate on reference profile only.php-src reference
ext/mbstring/mbstring.c—mb_str_padregistration (PHP 8.3+)PHP implementation target
lib/CompilerVersion.php—advertisesMbStrPad()/supportsMbStrPad()gate on stable runtime or explicit forward profileext/mbstring/Module.phporBuiltinIntrospectionPolicy— withholdmb_str_padfromfunction_exists()on reference profileext/mbstring/mb_str_pad.php— implementation unchanged; registration/policy onlyRepro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_gap_mb_str_pad_phantom_reference.php'Done when
okon default reference profilePHP_COMPILER_PROFILE=8.4still callable and may advertise per forward-profile rulestest/compliance/cases/stdlib/North star: #1492 · closed #16776 regressed