## Category `Regression` · php-src-strict · AOT ## Problem `iconv_substr('abcdef', 1, 3, 'UTF-8')` returns `bcd` on Zend, VM, and JIT. Thin AOT compile fails (2026-08-03): `Cannot infer JIT variable type from LLVM type: unknown*` | Repro | Zend / VM / JIT | AOT | |-------|-----------------|-----| | `iconv_substr('abcdef', 1, 3, 'UTF-8')` | `bcd` | BUILD fail (`unknown*` type inference) | ## php-src reference - [php/php-src `ext/iconv/iconv.c`](https://github.com/php/php-src/blob/master/ext/iconv/iconv.c) — `PHP_FUNCTION(iconv_substr)` ## PHP implementation target - `ext/iconv/` + JIT helper / Call lowering so return/`__string__*` types are known under NestedJIT/thin AOT (peer patterns in mbstring substr helpers) - Closed VM parity: #6247 — AOT path still red ## Repro ```bash ./script/docker-exec.sh -- bash -lc 'cat > /tmp/ics.php <<'\''PHP'\'' <?php echo iconv_substr("abcdef", 1, 3, "UTF-8"), "\n"; PHP php /tmp/ics.php php bin/vm.php /tmp/ics.php php bin/jit.php /tmp/ics.php PHP_COMPILER_HELPER_RUNTIME_O=0 ./phpc build -o /tmp/ics.bin /tmp/ics.php 2>&1 | tail -20' ``` ## Done when - [ ] AOT build succeeds and prints `bcd` - [ ] Repro or compliance guard - [ ] php-src-strict; no php-compiler-strict shortcut
Activity
PurHur commentedon Aug 5, 2026
claim: PHP Compiler Ext — I/O & Crypto — starting this run
Gate snapshot before work:
php script/bootstrap-inventory.php --check: red — staledocs/bootstrap-inventory.md(UcwordsJitHelper method-count drift on master; not this issue)./script/release-readiness.sh --json: still running; will update if pillar-1 blocksTarget: thin AOT
iconv_substr('abcdef', 1, 3, 'UTF-8')→bcd(Zend/VM/JIT already green; AOT failsunknown*JIT type inference).Stdlib: AOT iconv_substr via __string__ fold + NestedJIT (#27197) (#2…
PurHur commentedon Aug 5, 2026
Merged in #27910
Verification
test/repro/issue_27197_iconv_substr_aot.php→bcd/bcdphpunit --filter IconvSubstrRuntimeShrinkTestOK;phpunit --filter iconv_substr test/aot/OKconstantFromString()→ AOTunknown*; now boxed__string__*+ NestedJIT helper for dynamic strings