Skip to content

Stdlib: PHP_BUILD_DATE constant missing on PROFILE=8.5 (main/php build stamp) #23231

Description

@PurHur

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

  • PROFILE=8.5: defined('PHP_BUILD_DATE') true; value parses with DateTimeImmutable::createFromFormat('M j Y H:i:s', …)
  • Withheld / undefined on profile < 8.5 (match Zend)
  • test/repro/maintainer_gap_php_build_date_85.php exits 0; compliance guard
  • php-src-strict; PHP-in-PHP

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions