[php-src] Issue #19938: we cant set error_reporting through envs when we use the php const
| From: | Scarbous | Date: | Tue, 23 Sep 2025 20:31:11 +0000 |
| Subject: | [php-src] Issue #19938: we cant set error_reporting through envs when we use the php const | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250900@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/19938
Author: Scarbous
### Description
The following code:
```ini
error_reporting=${PHP_ERROR_REPORTING}
```
**Example 1**
```sh
PHP_ERROR_REPORTING="E_ERROR | E_CORE_ERROR" php -cphp.ini -r
'var_dump(error_reporting());'
```
**Example 2**
```sh
PHP_ERROR_REPORTING="E_ERROR | E_CORE_ERROR" php -cphp.ini -i | grep error_reporting
```
Resulted in this output:
**Example 1**
```
int(0)
```
**Example 2**
```
error_reporting => E_ERROR | E_CORE_ERROR => E_ERROR | E_CORE_ERROR
```
But I expected this output instead:
**Example 1**
```
int(30719)
```
**Example 2**
```
error_reporting => 30719 => 30719
```
-----
https://github.com/shopware/docker/issues/152
### PHP Version
```plain
PHP 8.3.25 (cli) (built: Aug 28 2025 19:52:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.25, Copyright (c) Zend Technologies
with Zend OPcache v8.3.25, Copyright (c), by Zend Technologies
```
### Operating System
Alpine Linux 3.22.1