Category
enhancement · php-src-strict · IMAP surface · pillar 4
Problem
extension_loaded("imap") / imap_open are advertised, but Modified UTF-7 mailbox-name converters from php-src are absent. Distinct from #27681 (imap_utf7_decode / imap_utf7_encode — different API) and from #27674 / #27680 (imap_is_open / imap_timeout).
Verified 2026-08-05 on tip 49577690f inside ./script/docker-exec.sh.
| Symbol |
Zend (php-src stub) |
VM (IMAP advertised) |
extension_loaded("imap") |
(host may lack ext) |
true |
function_exists("imap_open") |
— |
true |
function_exists("imap_mutf7_to_utf8") |
present in stubs |
false |
function_exists("imap_utf8_to_mutf7") |
present in stubs |
false |
php-src reference
PHP implementation target
ext/imap/ PHP implementations + Module registration + Reflection stubs matching php-src
- Prefer pure PHP Modified UTF-7 codec (no new
runtime/*.c); wire JIT/AOT via existing Internal pattern
- PHP-in-PHP first
Repro
./script/docker-exec.sh -- bash -lc '
cat > /tmp/imap_mutf7.php <<'"'"'PHP'"'"'
<?php
echo "ext=", extension_loaded("imap") ? "Y" : "N", "\n";
echo "open=", function_exists("imap_open") ? "Y" : "N", "\n";
echo "mutf7_to_utf8=", function_exists("imap_mutf7_to_utf8") ? "Y" : "N", "\n";
echo "utf8_to_mutf7=", function_exists("imap_utf8_to_mutf7") ? "Y" : "N", "\n";
if (function_exists("imap_utf8_to_mutf7") && function_exists("imap_mutf7_to_utf8")) {
$m = imap_utf8_to_mutf7("Test");
echo "round=", imap_mutf7_to_utf8($m), "\n";
}
PHP
php bin/vm.php /tmp/imap_mutf7.php
'
Done when
Gate context (2026-08-05)
user_release_ready: no — spine coverage missing SscanfStrtolApply.php; north-star5-fast red
Category
enhancement· php-src-strict · IMAP surface · pillar 4Problem
extension_loaded("imap")/imap_openare advertised, but Modified UTF-7 mailbox-name converters from php-src are absent. Distinct from #27681 (imap_utf7_decode/imap_utf7_encode— different API) and from #27674 / #27680 (imap_is_open/imap_timeout).Verified 2026-08-05 on tip
49577690finside./script/docker-exec.sh.extension_loaded("imap")truefunction_exists("imap_open")truefunction_exists("imap_mutf7_to_utf8")falsefunction_exists("imap_utf8_to_mutf7")falsephp-src reference
ext/imap/php_imap.stub.php—imap_mutf7_to_utf8(string $string): string|false,imap_utf8_to_mutf7(string $string): string|falseext/imap/php_imap.c— Modified UTF-7 encode/decode handlersPHP implementation target
ext/imap/PHP implementations + Module registration + Reflection stubs matching php-srcruntime/*.c); wire JIT/AOT via existing Internal patternRepro
Done when
.phpt)Gate context (2026-08-05)
user_release_ready: no— spine coverage missingSscanfStrtolApply.php;north-star5-fastred