php / php/php-src

Support ini expressions inside env variables (and possibly ini_set())

Open
#19,938 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category: Configuration Feature Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.2k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

error_reporting=${PHP_ERROR_REPORTING}

Example 1

PHP_ERROR_REPORTING="E_ERROR | E_CORE_ERROR" php -cphp.ini -r 'var_dump(error_reporting());'

Example 2

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
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with php.ini using the PHP_ERROR_REPORTING environment variable and the two documented CLI commands. Trace how the INI value is parsed and converted for error_reporting(); done means both commands produce the numeric value 30719, with the ini_set() scope clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.