<?php
var_dump(function_exists('mb_str_pad')); // true on VM (2026-06-19)
echo mb_str_pad('あ', 4, 'x'), "\n"; // あxxx
enum E: string { case A = 'a'; }
try {
mb_str_pad(E::A, 5);
echo "enum FAIL\n";
} catch (Throwable $e) {
echo get_class($e), ': ', $e->getMessage(), "\n";
}
Category
stdlib· php-src-strict · spec refresh 2026-06-19Problem
mb_str_pad()(PHP 8.3+) pads a multibyte string to a target display width. VM landed via #6081 (ext/mbstring/mb_str_pad.php,VmMbstring::mb_str_pad()), but this tracker stays open for remaining Zend gaps:JitMbStrPad.phpstill uses in-module LLVM width logic instead of PHP SSOT (see php-in-php: ext/bcmath AOT lowering — share VmBcmath PHP path, unblock native self-host (ext/bcmath) #6100-style audit)TypeErrorunder php-src-strict (mirrormb_strlenguards)docs/capabilities.mdnotes JIT PHPT when greenBundled duplicate: #6081 also tracks
grapheme_strimwidth()(#9793); this issue is the mb_str_pad-only slice.php-src reference
ext/mbstring/mbstring.c—PHP_FUNCTION(mb_str_pad)ext/mbstring/mbstring.stub.phpRepro (VM OK; enum gap)
Scope
ext/mbstring/mb_str_pad.phpext/mbstring/VmMbstring.phpext/mbstring/JitMbStrPad.phptest/compliance/cases/stdlib/mb_str_pad*.phptDone when
TypeErroron VM/JIT/AOT (php-src-strict)STR_PAD_*table./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter mb_str_pad'greenphp script/capability-matrix.phpreflects JIT/AOT notesRelated