Category
stdlib · php-src-strict · PHP 8.5 · INI · pillar 4 correctness
Problem
PHP 8.5 adds INI directive max_memory_limit (INI_SYSTEM, default -1) as a ceiling for memory_limit. Under PHP_COMPILER_PROFILE=8.5, ini_get('max_memory_limit') returns false (unknown directive).
Verified 2026-07-26:
| Repro |
Zend 8.5 |
VM PROFILE=8.5 |
ini_get('max_memory_limit') |
"-1" (string) |
false |
php-src reference
PHP implementation target
- INI table in PHP (
ext/standard / runtime INI helpers already used for memory_limit) — register max_memory_limit when profile ≥ 8.5
- Enforce ceiling when
ini_set('memory_limit', …) would exceed it (warning + clamp), matching Zend
- PHP-in-PHP; no new
runtime/*.c unless an existing thin INI ABI is required
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
PHP_COMPILER_PROFILE=8.5 php bin/vm.php test/repro/maintainer_gap_max_memory_limit_ini_85.php'
Done when
Category
stdlib· php-src-strict · PHP 8.5 · INI · pillar 4 correctnessProblem
PHP 8.5 adds INI directive
max_memory_limit(INI_SYSTEM, default-1) as a ceiling formemory_limit. UnderPHP_COMPILER_PROFILE=8.5,ini_get('max_memory_limit')returnsfalse(unknown directive).Verified 2026-07-26:
PROFILE=8.5ini_get('max_memory_limit')"-1"(string)falsephp-src reference
max_memory_limitmain/ini/ Zend INI registration formax_memory_limitPHP implementation target
ext/standard/ runtime INI helpers already used formemory_limit) — registermax_memory_limitwhen profile ≥ 8.5ini_set('memory_limit', …)would exceed it (warning + clamp), matching Zendruntime/*.cunless an existing thin INI ABI is requiredRepro
Done when
PROFILE=8.5:ini_get('max_memory_limit')returns string (default"-1")memory_limitabove the ceiling warns and clamps like Zend (when ceiling ≠ -1)ini_getfalse) — php-src-stricttest/repro/maintainer_gap_max_memory_limit_ini_85.phpexits 0; compliance.phpt