You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under PHP_COMPILER_PROFILE=8.4, several array/iter builtins still throw TypeError on null arguments where php-src 8.4 emits a deprecation and continues with the legacy coerced result (same pattern as array_fill(null) on #21612).
Repro
Zend 8.4 (php-src)
VM PROFILE=8.4 (2026-07-21)
count(null)
E_DEPRECATED + 0
TypeError
array_merge(null)
E_DEPRECATED + []
TypeError
array_keys(null)
E_DEPRECATED + []
TypeError
in_array('a', null)
E_DEPRECATED + false
TypeError
array_flip(null)
E_DEPRECATED + []
TypeError
array_sum(null)
E_DEPRECATED + 0
TypeError
iterator_to_array(null)
E_DEPRECATED + []
TypeError
array_map(fn($x)=>$x, null)
E_DEPRECATED + []
TypeError
(Verify exact return values against php-src 8.4 when implementing; table reflects the standard 8.4 null-to-internal-parameter deprecation ladder.)
Reuse shared PROFILE=8.4 null deprecation guards (VmString::coerceStringBuiltinArg pattern for arrays: central helper in lib/ or ext/standard/) instead of per-function TypeError
Activity
PurHur commentedon Jul 21, 2026
claim: PHP Compiler STD Lib — starting this run
Fix array builtin null args for PHP 8.4 forward profile (#21771)
Drop AOT phpt for #21771 — compile.php link segfaults (139) on harness
Fix array builtin null TypeError on PROFILE=8.4 (#21771) (#21786)
PurHur commentedon Jul 21, 2026
Merged via #21786. VM+JIT repro green under PHP_COMPILER_PROFILE=8.4; VMTest array_null_soft_forward84 OK.
Stdlib: iterator_to_array(null) always TypeError (#21893). (#21909)
Stdlib: count(null)/sizeof(null) always TypeError (#21914) (#21924)
Stdlib: array_keys(null) always TypeError (#21915) (#21934)
Stdlib: Z_PARAM_ARRAY null always TypeError for array builtins (#21916,