Skip to content

Regression: Locale/NumberFormatter/IntlCalendar/ResourceBundle class_exists true without ext/intl (re-#19670, ext/intl/php_intl.c) #22692

Description

@PurHur

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

  • Listed classes/functions absent when Zend without intl would report them absent
  • Compliance .phpt guard
  • php-src-strict; no php-compiler-strict shortcut

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions