Category
stdlib · php-src-strict · intl OOP phantoms (pillar 4)
Problem
Host Zend without ext/intl reports class_exists('Locale'|'NumberFormatter'|'IntlCalendar'|'ResourceBundle', false) === false and function_exists('transliterator_create'|'intl_get_error_code') === false. The VM registers these names anyway (same for PHP_COMPILER_PROFILE=8.4), regressing closed #19670 / #16214.
Sibling of the extension_loaded('intl') phantom (re-#11472) — fix registration so OOP/procedural intl symbols are absent unless the extension is honestly loaded.
Probed 2026-07-23 on master VM vs host Zend 8.2.32.
| Repro |
Zend 8.2+ (no intl) |
VM / VM PROFILE=8.4 |
class_exists('Locale', false) |
false |
true |
class_exists('NumberFormatter', false) |
false |
true |
class_exists('IntlCalendar', false) |
false |
true |
class_exists('ResourceBundle', false) |
false |
true |
function_exists('transliterator_create') |
false |
true |
function_exists('intl_get_error_code') |
false |
true |
php-src reference
PHP implementation target
ext/intl/ Module / autoload registration — gate class + function registration on real intl availability (or profile-honest intl), matching Zend class_exists/function_exists
- PHP-in-PHP only
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '"'"'
foreach (["Locale","NumberFormatter","IntlCalendar","ResourceBundle"] as $c) {
echo "$c=", class_exists($c, false) ? "Y" : "N", "\n";
}
foreach (["transliterator_create","intl_get_error_code"] as $f) {
echo "$f=", function_exists($f) ? "Y" : "N", "\n";
}
'"'"''
# Zend: all N; VM today: all Y
Done when
Category
stdlib· php-src-strict · intl OOP phantoms (pillar 4)Problem
Host Zend without
ext/intlreportsclass_exists('Locale'|'NumberFormatter'|'IntlCalendar'|'ResourceBundle', false) === falseandfunction_exists('transliterator_create'|'intl_get_error_code') === false. The VM registers these names anyway (same forPHP_COMPILER_PROFILE=8.4), regressing closed #19670 / #16214.Sibling of the
extension_loaded('intl')phantom (re-#11472) — fix registration so OOP/procedural intl symbols are absent unless the extension is honestly loaded.Probed 2026-07-23 on master VM vs host Zend 8.2.32.
class_exists('Locale', false)falsetrueclass_exists('NumberFormatter', false)falsetrueclass_exists('IntlCalendar', false)falsetrueclass_exists('ResourceBundle', false)falsetruefunction_exists('transliterator_create')falsetruefunction_exists('intl_get_error_code')falsetruephp-src reference
ext/intl/php_intl.c— MINIT registers classes only when module loadsext/intl/locale/— Locale / NumberFormatter / calendar / resourcebundlePHP implementation target
ext/intl/Module / autoload registration — gate class + function registration on real intl availability (or profile-honest intl), matching Zendclass_exists/function_existsRepro
Done when
.phptguard