Category
bug · php-src-strict · AOT static array dim fetch
Problem
Assigning an array literal to an untyped static property stores a usable array (VM-correct count / local copy), but dimension fetch on the static under thin AOT returns empty / null. Zend and VM print the element. ?? / assign-to-local paths work; bare echo C::$a['k'] does not.
| Repro |
Zend / VM |
AOT (master @ 048672b) |
C::$a=["x"=>1]; echo C::$a["x"]; |
1 |
`` (empty) |
C::$a=["x"=>1]; echo count(C::$a), ":", C::$a["x"]; |
1:1 |
1: |
C::$a=["x"=>1]; $t=C::$a; echo $t["x"]; |
1 |
1 |
C::$a=["x"=>1]; echo C::$a["x"] ?? "missing"; |
1 |
1 |
Silent wrong output — characteristic failure mode (AGENTS.md §3). Remaining row from AOT correctness group 3 / #31967 after the honest compile-fatal was retired.
php-src reference
PHP implementation target
- Static property read used as array container for dim fetch — ensure hashtable/
__value__ path matches local copy (lib/JIT.php / lib/JIT/Builtin/Type/ObjectStaticPropertyLlvm.php / dim fetch helpers)
- No new
runtime/*.c
Repro
./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_HELPER_RUNTIME_O=0; php bin/compile.php -o /tmp/sa.bin test/repro/issue_NNNN_static_array_dim_aot.php && /tmp/sa.bin'
Done when
Parent
- Peer inventory #31968 / group 3 statics; leftover of #31967 array-literal static store row (now silent wrong output, not compile fatal)
Category
bug· php-src-strict · AOT static array dim fetchProblem
Assigning an array literal to an untyped static property stores a usable array (VM-correct
count/ local copy), but dimension fetch on the static under thin AOT returns empty / null. Zend and VM print the element.??/ assign-to-local paths work; bareecho C::$a['k']does not.C::$a=["x"=>1]; echo C::$a["x"];1C::$a=["x"=>1]; echo count(C::$a), ":", C::$a["x"];1:11:C::$a=["x"=>1]; $t=C::$a; echo $t["x"];11C::$a=["x"=>1]; echo C::$a["x"] ?? "missing";11Silent wrong output — characteristic failure mode (AGENTS.md §3). Remaining row from AOT correctness group 3 / #31967 after the honest compile-fatal was retired.
php-src reference
Zend/zend_execute.c—zend_fetch_dimension/ static property fetchZend/zend_object_handlers.c— static property readPHP implementation target
__value__path matches local copy (lib/JIT.php/lib/JIT/Builtin/Type/ObjectStaticPropertyLlvm.php/ dim fetch helpers)runtime/*.cRepro
./script/aot-smoke.sh ./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_HELPER_RUNTIME_O=0; php bin/compile.php -o /tmp/sa.bin test/repro/issue_NNNN_static_array_dim_aot.php && /tmp/sa.bin'Done when
echo C::$a["k"]matches Zend under AOT (repeat ≥5)./script/aot-smoke.shstays 8/8Parent