Category
stdlib · jit · php-src-strict
Problem
The JIT lowering for case-insensitive string search is missing:
ext/standard/JitStringSearch.php throws:
LogicException: JitStringSearch::find() case-insensitive path is not implemented
This likely impacts stripos(), strripos(), stristr() and other builtins that require case-folded search in JIT/AOT mode.
php-src reference
ext/standard/string.c — PHP_FUNCTION(stripos), strripos, stristr and helper routines
Repro
<?php
var_dump(stripos('Hello', 'he')); // 0
var_dump(strripos('aAaA', 'aa')); // 2
# VM (control): should already work
php bin/vm.php repro.php
# JIT (expected to fail today):
php bin/jit.php repro.php
Expected (Zend)
int(0) then int(2).
Actual (JIT today)
Fatal LogicException from JitStringSearch::find() case-insensitive path.
Scope (this repo)
ext/standard/JitStringSearch.php — implement case-insensitive path (ASCII + PHP locale rules as php-src does)
lib/JIT/Builtin/ lowering for the affected builtins
- Tests:
test/compliance/cases/stdlib/stripos_case_insensitive.phpt
- Mark backend expectations (VM + JIT) per capability matrix if needed
Done when
php bin/jit.php repro.php matches Zend output for the probes
- VM and JIT agree for the same inputs in php-src-strict mode
- Capability matrix reflects support (if it was previously VM-only)
Category
stdlib·jit· php-src-strictProblem
The JIT lowering for case-insensitive string search is missing:
ext/standard/JitStringSearch.phpthrows:LogicException: JitStringSearch::find() case-insensitive path is not implementedThis likely impacts
stripos(),strripos(),stristr()and other builtins that require case-folded search in JIT/AOT mode.php-src reference
ext/standard/string.c—PHP_FUNCTION(stripos),strripos,stristrand helper routinesRepro
Expected (Zend)
int(0)thenint(2).Actual (JIT today)
Fatal
LogicExceptionfromJitStringSearch::find()case-insensitive path.Scope (this repo)
ext/standard/JitStringSearch.php— implement case-insensitive path (ASCII + PHP locale rules as php-src does)lib/JIT/Builtin/lowering for the affected builtinstest/compliance/cases/stdlib/stripos_case_insensitive.phptDone when
php bin/jit.php repro.phpmatches Zend output for the probes