Skip to content
PHP News
Search
Voting PHP 8.7

ini_get_all(): Case-Insensitive Extension Names

On the PHP wiki as Case-insensitive extension names in ini_get_all()

Makes ini_get_all() accept extension names in any letter case, as extension_loaded() and phpversion() already do.

Implement case-insensitive extension names in ini_get_all()?

Primary vote · 2/3 majority

20 Yes 0 No 3 abstain 100% approval

Closes .

Weilin Du opened the internals discussion on October 16, 2026, after an earlier thread about the idea. The RFC targets PHP 8.7, and no implementation is linked yet. Weilin Du opened the vote on November 2, 2026, after posting an intent to vote on October 30. Voting closes on November 16, 2026 at 00:00 UTC, and the RFC needs a two-thirds majority to pass.

Summary

ini_get_all() returns the ini settings for one extension, but only if you spell the extension's name in lowercase. Other functions that take an extension name, like extension_loaded(), get_extension_funcs() and phpversion(), don't care about case. Weilin Du's RFC makes ini_get_all() work the same way, so one spelling works with all four.

Show me

extension_loaded('Pcre'); // true
phpversion('Pcre');       // the extension's version
ini_get_all('Pcre');      // today: E_WARNING, then false

// PHP 8.7 (proposed):
var_dump(ini_get_all('pcre') === ini_get_all('Pcre')); // bool(true)

The match ignores only ASCII letter case, and it doesn't depend on the current locale. It works the same whether you ask for full details or only the values, through the $details argument.

What it means for existing code

Calls that work today keep working. The only change is for a name that differs from a loaded extension's name only in case. That used to raise a warning and return false, and now it returns the settings. Code that relied on the failure will see different behavior.