# RFC: Case-insensitive extension names in ini_get_all()

- Status: Implemented (PHP 8.7)
- Authors: Weilin Du, weilindu@php.net
- Date: 2026-10-17
- Version: 1.0
- Implementation: https://github.com/php/php-src/pull/25448
- Original: https://wiki.php.net/rfc/case_insensitive_ini_get_all
- Page: https://externals.io/rfc/case_insensitive_ini_get_all
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

## Votes

### Implement case-insensitive extension names in ini_get_all()? (closed)

Yes: 20 · No: 0 · Abstain: 3

Voters: alcaeus (Yes), ashnazg (Yes), ayesh (Yes), calvinb (Yes), crell (Yes), devnexen (Yes), duncan3dc (Yes), dunglas (Yes), ericmann (Yes), galvao (Yes), geekcom (Yes), iliaa (Yes), ilutov (Yes), jordikroon (Yes), jorg_sowa (Abstain), mbeccati (Yes), mcmic (Yes), narf (Abstain), ocramius (Yes), sjoerd (Yes), thorstenr (Yes), timwolla (Abstain), weilindu (Yes)

## Discussions on the mailing list

- [Consistent case-insensitive module registry lookups](https://externals.io/message/132226.md) — started on 2026-08-15, 15 messages
- [\[RFC\] Case-insensitive extension names in ini_get_all()](https://externals.io/message/132875.md) — started on 2026-10-16, 1 messages
- [\[VOTE\] \[RFC\] Case-insensitive extension names in ini_get_all()](https://externals.io/message/132979.md) — started on 2026-10-30, 3 messages

---

## Introduction

PHP's extension-query functions handle extension names inconsistently. `extension_loaded()`, `get_extension_funcs()`, and `phpversion()` already accept case-insensitive names, while `ini_get_all()` requires lowercase names:

```php
<?php
extension_loaded('Pcre');    // true
get_extension_funcs('Pcre'); // array of function names
phpversion('Pcre');         // extension version string
ini_get_all('Pcre');        // E_WARNING, then false
?>
```

This RFC proposes making `ini_get_all()` case-insensitive so the same extension name can be used consistently across all four functions, without callers needing to normalize it for one particular API.

## Proposal

Resolve the `$extension` argument using ASCII case-insensitive matching, independently of the current locale. This applies to both values of `$details` (the second parameter).

```php
<?php
// PHP 8.7:
var_dump(ini_get_all('pcre') === ini_get_all('Pcre')); // bool(true)
var_dump(ini_get_all('pcre', false) === ini_get_all('PCRE', false)); // bool(true)
?>
```

## Backward Incompatible Changes

Names differing only in capitalization from a loaded extension now succeed instead of raising a warning and returning `false`. Code relying on that failure will observe different behavior.

Existing successful calls are unaffected.

## Proposed PHP Version(s)

PHP 8.7

## RFC Impact

The ini\_get\_all function will be more consistent with the rest of the functions in the php core concerning extension's name when it comes to case-sensitiveness.

## Voting Choices

Voting ends on 2026-11-16 at 00:00:00 UTC.

Primary Vote requiring a 2/3 majority to accept the RFC:

**Vote: Implement case-insensitive extension names in ini\_get\_all()?** — Yes: 20 · No: 0 · Abstain: 3 (closed)

## Patches and Tests

TBD.

## References

- [Initial internals discussion](https://externals.io/message/132226)
