Category
bug · php-src-strict
Problem
locale_filter_matches() already has working PHP semantics in ext/intl/VmLocale.php, including the canonicalize-sensitive behavior covered by the existing intl compliance case. The JIT entrypoint in ext/intl/locale_filter_matches.php still throws RuntimeException: locale_filter_matches() JIT lowering not implemented; use VM, so backend selection changes observable behavior versus php-src.
| Repro |
Zend / php-src expected |
JIT (2026-08-18) |
locale_filter_matches("de-DE", "de", false) |
true |
RuntimeException: locale_filter_matches() JIT lowering not implemented; use VM |
VM/reference confirmation in this tree today:
./script/docker-exec.sh -- bash -lc 'php test/repro/issue_25198_locale_lookup_named.php' prints filter_pos=true and filter_named=true
./script/docker-exec.sh -- bash -lc 'php -r '\''require \"vendor/autoload.php\"; var_dump(PHPCompiler\\ext\\intl\\VmLocale::filterMatches(\"de-DE\", \"de\", false));'\''' prints bool(true)
test/compliance/cases/intl/locale_filter_matches_canonicalize_20939.phpt already records php-src-strict canonicalize behavior for the VM path
php-src reference
PHP implementation target
ext/intl/locale_filter_matches.php — lower JIT calls instead of throwing
ext/intl/VmLocale.php — keep prefix-match/canonicalize semantics SSOT
lib/JIT/ helper if necessary, but do not move the behavior into new C/runtime branches
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/issue_25198_locale_lookup_named.php'
./script/docker-exec.sh -- bash -lc 'php -r '\''require "vendor/autoload.php"; $ctx=(new ReflectionClass("PHPCompiler\\JIT\\Context"))->newInstanceWithoutConstructor(); try { (new PHPCompiler\ext\intl\locale_filter_matches())->call($ctx); } catch (Throwable $e) { echo get_class($e),": ",$e->getMessage(),"\n"; }'\'''
Done when
Category
bug· php-src-strictProblem
locale_filter_matches()already has working PHP semantics inext/intl/VmLocale.php, including the canonicalize-sensitive behavior covered by the existing intl compliance case. The JIT entrypoint inext/intl/locale_filter_matches.phpstill throwsRuntimeException: locale_filter_matches() JIT lowering not implemented; use VM, so backend selection changes observable behavior versus php-src.locale_filter_matches("de-DE", "de", false)trueRuntimeException: locale_filter_matches() JIT lowering not implemented; use VMVM/reference confirmation in this tree today:
./script/docker-exec.sh -- bash -lc 'php test/repro/issue_25198_locale_lookup_named.php'printsfilter_pos=trueandfilter_named=true./script/docker-exec.sh -- bash -lc 'php -r '\''require \"vendor/autoload.php\"; var_dump(PHPCompiler\\ext\\intl\\VmLocale::filterMatches(\"de-DE\", \"de\", false));'\'''printsbool(true)test/compliance/cases/intl/locale_filter_matches_canonicalize_20939.phptalready records php-src-strict canonicalize behavior for the VM pathphp-src reference
ext/intl/locale/locale_methods.c—locale_filter_matches()/ Locale::filterMatches semanticsext/intl/php_intl.stub.php— procedural arginfo / named-parameter surfacePHP implementation target
ext/intl/locale_filter_matches.php— lower JIT calls instead of throwingext/intl/VmLocale.php— keep prefix-match/canonicalize semantics SSOTlib/JIT/helper if necessary, but do not move the behavior into new C/runtime branchesRepro
Done when
locale_filter_matches()returns the same result on JIT as php-src/VM for ordinary and canonicalize-sensitive cases instead of throwingtest/compliance/cases/intl/locale_filter_matches_canonicalize_20939.phptis covered on the JIT path tootest/repro/issue_25198_locale_lookup_named.phpbehave identically on VM and JIT