Repository navigation
Labels
area:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsPhase 4 – stdlib for web apps
Description
Category
stdlib
Problem
Procedural timezone discovery helpers from ext/date are missing. #3072 landed DateTime / DateTimeZone OOP on VM; #3292 tracks strtotime / date_default_timezone_*. Frameworks and config loaders also call:
timezone_identifiers_list()timezone_name_from_abbr()timezone_abbreviations_list()date_sunrise()/date_sunset()(procedural sun times)
All function_exists() probes return false today.
php-src reference
ext/date/php_date.c—PHP_FUNCTION(timezone_identifiers_list),timezone_name_from_abbr,timezone_abbreviations_listext/date/php_date.c—PHP_FUNCTION(date_sunrise),PHP_FUNCTION(date_sunset)ext/date/lib/timelib.c— timezone database (timelib_timezone_list, sun calc)ext/date/php_datetime.c— shared timezone DB with OOP layer (Stdlib: DateTime / DateTimeImmutable OOP (ext/date parity) #3072)
Repro (today)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "
foreach ([\"timezone_identifiers_list\",\"timezone_name_from_abbr\",\"date_sunrise\"] as \$fn) {
echo \$fn, \": \", function_exists(\$fn) ? \"yes\" : \"no\", \"\\n\";
}
echo timezone_identifiers_list()[0], \"\\n\";
"'Zend PHP: all three yes; first identifier e.g. Africa/Abidjan
This compiler: all no; fatal Call to undefined function timezone_identifiers_list()
Scope (this repo)
| Area | Path |
|---|---|
| Builtins | ext/date/timezone_identifiers_list.php (new module or extend ext/standard/VmDate.php) |
| Host bridge | Reuse host DateTimeZone::listIdentifiers() / timelib-equivalent for v1 (same strategy as #3072) |
| Constants | Share DATE_SUNRISE_* / DATE_SUNSET_* with procedural sun functions |
| Tests | test/compliance/cases/stdlib/timezone_identifiers.phpt, date_sunrise_basic.phpt |
| Matrix | script/capability-matrix.php |
v1: full identifier list + date_sunrise/date_sunset with lat/long/timestamp; defer timezone_abbreviations_list edge cases if needed.
Done when
-
timezone_identifiers_list()returns non-empty array containingUTC -
date_sunrise()for fixed lat/long/timestamp matches Zend within 1 second -
./script/ci-fast.sh --filter timezone_identifiersgreen - Document VM-only JIT/AOT column in matrix (phase 1)
Related
- Stdlib: DateTime / DateTimeImmutable OOP (ext/date parity) #3072 DateTime OOP · Stdlib: strtotime() / mktime() / checkdate() / date_default_timezone_* — procedural date parsing (ext/date parity) #3292 strtotime / default timezone
- Epic: Self-host critical path — compiler compiles itself (M3→M5) #1492 north star
Metadata
Metadata
Assignees
Labels
area:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsPhase 4 – stdlib for web apps
Activity
PurHur commentedon Jun 12, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 12, 2026
Merged via #8085.
Verification
```bash
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "
foreach (["timezone_identifiers_list","date_sunrise"] as $fn) {
echo $fn, ": ", function_exists($fn) ? "yes" : "no", "\n";
}
echo timezone_identifiers_list()[0], "\n";
"'
timezone_identifiers_list: yes / Africa/Abidjan
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter timezone_identifiers'
OK (2 tests)
```
timezone_name_from_abbr()/timezone_abbreviations_list()remain open on this issue for a follow-up.PurHur commentedon Jun 12, 2026
Merged via #8089 —
timezone_identifiers_list()JIT/AOT lowering via compile-time list baking (JitTimezoneIdentifiersList+VmDateTimeNative). Verification:vendor/bin/phpunit --filter timezone_identifiers_list_jitOK (2 tests);php bin/compile.php -l test/fixtures/aot/compile-only/timezone_identifiers_list.phpexit 0; JIT compile probejitCompileBlockOK.Stdlib: timezone_identifiers_list() JIT/AOT lowering (#3504). (#8089)