Category
stdlib · php-src-strict · PHP 8.5 · core constants · pillar 4 correctness
Problem
PHP 8.5 always defines the global constant PHP_BUILD_DATE (build stamp, format M j Y H:i:s). Under PHP_COMPILER_PROFILE=8.5, defined('PHP_BUILD_DATE') is false while other 8.5 surface (array_first, get_error_handler, pipe |>) is already present.
Verified 2026-07-26:
| Repro |
Zend 8.5 |
VM PROFILE=8.5 |
defined('PHP_BUILD_DATE') |
true |
false |
DateTimeImmutable::createFromFormat('M j Y H:i:s', PHP_BUILD_DATE) |
object |
n/a |
Note: PHP_BUILD_PROVIDER is optional (only when set at ./configure) — do not force-define it. This issue is only PHP_BUILD_DATE.
php-src reference
PHP implementation target
lib/ / ext/standard constant registration (CompilerVersion / credits / version builtins) — define PHP_BUILD_DATE when profile ≥ 8.5
- Prefer a stable deterministic stamp for the compiler binary (document format); parseable with
M j Y H:i:s
- PHP-in-PHP; no new C
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_php_build_date_85.php'
Done when
Category
stdlib· php-src-strict · PHP 8.5 · core constants · pillar 4 correctnessProblem
PHP 8.5 always defines the global constant
PHP_BUILD_DATE(build stamp, formatM j Y H:i:s). UnderPHP_COMPILER_PROFILE=8.5,defined('PHP_BUILD_DATE')is false while other 8.5 surface (array_first,get_error_handler, pipe|>) is already present.Verified 2026-07-26:
PROFILE=8.5defined('PHP_BUILD_DATE')truefalseDateTimeImmutable::createFromFormat('M j Y H:i:s', PHP_BUILD_DATE)Note:
PHP_BUILD_PROVIDERis optional (only when set at./configure) — do not force-define it. This issue is onlyPHP_BUILD_DATE.php-src reference
PHP_BUILD_DATEPHP_BUILD_DATE)PHP implementation target
lib//ext/standardconstant registration (CompilerVersion / credits / version builtins) — definePHP_BUILD_DATEwhen profile ≥ 8.5M j Y H:i:sRepro
Done when
PROFILE=8.5:defined('PHP_BUILD_DATE')true; value parses withDateTimeImmutable::createFromFormat('M j Y H:i:s', …)test/repro/maintainer_gap_php_build_date_85.phpexits 0; compliance guard