Re: Deprecate Undefined Constant Usage in php.ini Files (GH-20060)
| From: | Tim Düsterhus | Date: | Sun, 19 Oct 2025 19:14:00 +0000 |
| Subject: | Re: Deprecate Undefined Constant Usage in php.ini Files (GH-20060) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128868@lists.php.net to get a copy of this message | ||
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?
Best regards
Tim Düsterhus