Category
Stdlib · php-src-strict · ini compile-time lookup
Problem
get_cfg_var('display_errors') reads php.ini compile-time values. Zend returns an empty string when the directive is unset/off in the scanned ini; this compiler returns boolean true.
| Repro |
Zend 8.2 |
VM (2026-07-04) |
@get_cfg_var('display_errors') |
'' |
true |
php-src reference
PHP implementation target
ext/standard/get_cfg_var.php and/or ext/standard/VmIni.php — return ini string values with Zend coercion (not bool true for off directives)
- JIT:
lib/JIT/Builtin/ lowering if get_cfg_var is compiled
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_get_cfg_var_display_errors.php'
./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_get_cfg_var_display_errors.php'
Done when
Category
Stdlib· php-src-strict · ini compile-time lookupProblem
get_cfg_var('display_errors')reads php.ini compile-time values. Zend returns an empty string when the directive is unset/off in the scanned ini; this compiler returns booleantrue.@get_cfg_var('display_errors')''truephp-src reference
ext/standard/ini.c—PHP_FUNCTION(get_cfg_var),cfg_get_stringPHP implementation target
ext/standard/get_cfg_var.phpand/orext/standard/VmIni.php— return ini string values with Zend coercion (not bool true for off directives)lib/JIT/Builtin/lowering ifget_cfg_varis compiledRepro
Done when
get_cfg_var('display_errors')matches Zend type/value in default Docker env.phptundertest/compliance/cases/stdlib/get_cfg_var_display_errors.phpt