Category
stdlib · php-src-strict · ext/intl ResourceBundle procedural error aliases
Problem
After #6187 / #20739, OOP ResourceBundle::create() / get() / count() / getLocales() / getErrorCode() / getErrorMessage() work on VM (PROFILE=8.4), and procedurals resourcebundle_create / resourcebundle_get / resourcebundle_locales / resourcebundle_count are registered. php-src also exposes resourcebundle_get_error_code and resourcebundle_get_error_message, which remain undefined (same alias pattern as collator_get_error_* / msgfmt_get_error_* / numfmt_get_error_*).
| Repro |
Zend (intl) |
VM PROFILE=8.4 (2026-07-19) |
method_exists('ResourceBundle', 'getErrorCode') |
true |
true |
function_exists('resourcebundle_create') / resourcebundle_count |
true |
true |
function_exists('resourcebundle_get_error_code') |
true |
false |
function_exists('resourcebundle_get_error_message') |
true |
false |
php-src reference
PHP implementation target
- Add
ext/intl/resourcebundle_get_error_code.php + resourcebundle_get_error_message.php beside existing resourcebundle_*.php
- Reuse
VmResourceBundle / OOP error helpers — thin procedural wrappers only
- Register in
ext/intl/Module.php next to resourcebundle_count
- No new C in
runtime/; sync spine/inventory if new units added
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
cat > /tmp/rb_err_gap.php << "PHP"
<?php
echo "oop_err=" . (method_exists("ResourceBundle", "getErrorCode") ? "yes" : "no") . "\n";
foreach (["resourcebundle_create","resourcebundle_count","resourcebundle_get_error_code","resourcebundle_get_error_message"] as $f) {
echo "$f=" . (function_exists($f) ? "yes" : "no") . "\n";
}
PHP
PHP_COMPILER_PROFILE=8.4 php bin/vm.php /tmp/rb_err_gap.php'
Observed (2026-07-19):
oop_err=yes
resourcebundle_create=yes
resourcebundle_count=yes
resourcebundle_get_error_code=no
resourcebundle_get_error_message=no
Done when
Category
stdlib· php-src-strict · ext/intl ResourceBundle procedural error aliasesProblem
After #6187 / #20739, OOP
ResourceBundle::create()/get()/count()/getLocales()/getErrorCode()/getErrorMessage()work on VM (PROFILE=8.4), and proceduralsresourcebundle_create/resourcebundle_get/resourcebundle_locales/resourcebundle_countare registered. php-src also exposesresourcebundle_get_error_codeandresourcebundle_get_error_message, which remain undefined (same alias pattern ascollator_get_error_*/msgfmt_get_error_*/numfmt_get_error_*).PROFILE=8.4(2026-07-19)method_exists('ResourceBundle', 'getErrorCode')truetruefunction_exists('resourcebundle_create')/resourcebundle_counttruetruefunction_exists('resourcebundle_get_error_code')truefalsefunction_exists('resourcebundle_get_error_message')truefalsephp-src reference
ext/intl/resourcebundle/resourcebundle.stub.phpext/intl/resourcebundle/resourcebundle_class.c— error accessorsPHP implementation target
ext/intl/resourcebundle_get_error_code.php+resourcebundle_get_error_message.phpbeside existingresourcebundle_*.phpVmResourceBundle/ OOP error helpers — thin procedural wrappers onlyext/intl/Module.phpnext toresourcebundle_countruntime/; sync spine/inventory if new units addedRepro
Observed (2026-07-19):
Done when
getErrorCode/getErrorMessage/ Zendtest/compliance/cases/intl/; php-src-strictruntime/; spine/inventory synced for new units