On Sunday 19 October 2025 21:14:00 (+02:00), Tim Düsterhus wrote:

> Hi
> 
> On 10/5/25 14:54, Hans Krentel wrote:
> > The php.ini file parser (as used by `parse_ini_file()`) supports
> > constant resolution, including core predefined constants. However, the
> > current behavior with undefined constants is inconsistent with PHP 8's
> > strict handling of undefined constants in regular PHP code.
> 
> How would PHP differentiate between “constants” and “unquoted strings”, the 
> latter of which are explicitly supported (and encouraged) by the INI file 
> format?
> 

As it does today, no change. If you use a word that would expand to a constant 
name as it does today, you need to quote it.

This preparatory step - if required - can be done in advance and the 
configuration file remains forwards / backwards compatible so can be used 
across versions (e.g. configuration file templates).

Best,

-- hakre

Reply via email to