[php-src] PR #19943: Zend: Support constant expressions in error_reporting ini/env values
| From: | Scarbous | Date: | Wed, 24 Sep 2025 07:00:25 +0000 |
| Subject: | [php-src] PR #19943: Zend: Support constant expressions in error_reporting ini/env values | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-33333@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/19943
Author: Scarbous
Previously, error_reporting could only be set to numeric values via ini or environment variables.
This patch extends the OnUpdateErrorReporting handler to parse and evaluate constant expressions
(e.g., 'E_ERROR | E_CORE_ERROR') using the AST machinery, matching PHP's runtime
behavior. Invalid expressions fallback to E_ALL or 0.
Issue: #19938