You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ext/mbstring provides mb_encode_mimeheader() and mb_decode_mimeheader() for RFC 2047 encoded-word headers (mail subjects, HTTP headers with non-ASCII). This compiler has partial mbstring (mb_strlen yes) but function_exists('mb_encode_mimeheader') / mb_decode_mimeheader() → false on VM.
Mail and i18n code targeting PHP 8.x expects these alongside mb_convert_encoding() (tracked #3075).
Category
stdlibProblem
ext/mbstring provides
mb_encode_mimeheader()andmb_decode_mimeheader()for RFC 2047 encoded-word headers (mail subjects, HTTP headers with non-ASCII). This compiler has partial mbstring (mb_strlenyes) butfunction_exists('mb_encode_mimeheader')/mb_decode_mimeheader()→ false on VM.Mail and i18n code targeting PHP 8.x expects these alongside
mb_convert_encoding()(tracked #3075).php-src reference
ext/mbstring/mbstring.c—PHP_FUNCTION(mb_encode_mimeheader),PHP_FUNCTION(mb_decode_mimeheader)ext/mbstring/libmbfl— MIME header encoding helpersRepro
Observed (VM):
Zend PHP expected: both exist; round-trip non-ASCII subject lines per php-src tests.
Scope (this repo)
ext/mbstring/mb_encode_mimeheader.php,mb_decode_mimeheader.phpext/mbstring/Module.php(Bootstrap: ext/mbstring/ module skeleton — register mbstring builtins for self-host (M4) #5695 skeleton)TypeError(php-src-strict, Stdlib: mb_strlen() — enum case operand must TypeError (ext/mbstring/mbstring.c) #5873 pattern)runtime/; thin ABI only if profiling proves hot-path needDone when
function_exists→ truemb_decode_mimeheader(mb_encode_mimeheader("日本語", "UTF-8"))matches Zend for UTF-8 fixturesTypeError, not silent coerce / VM fataltest/compliance/cases/stdlib/mb_encode_mimeheader.phptgreen on VM./script/docker-exec.sh -- vendor/bin/phpunit --filter MbEncodeMimeheaderImplementation hints (PHP-in-PHP)
mb_convert_encodingwork (Stdlib: mb_convert_encoding / mb_detect_encoding (ext/mbstring parity) #3075).Verification
test/compliance/cases/stdlib/mb_encode_mimeheader.phptLinks