Category
Regression: · php-src-strict · SPL soft-null
Problem
SplDoublyLinkedList::add(null, $v) under non-strict types must emit E_DEPRECATED ("Passing null to parameter #1 ($index) of type int is deprecated") and insert at index 0. VM throws TypeError.
Sibling: offsetSet(null) already appends without DEP (#31731); add uses Z_PARAM_LONG and soft-deprecates.
Probed 2026-08-17 — host Zend PHP 8.2+ vs php bin/vm.php.
| Repro |
Zend 8.2+ |
VM (2026-08-17) |
$l->add(null, 'x') after one push |
E_DEPRECATED + insert at 0 |
TypeError Argument #1 ($index) |
php-src reference
PHP implementation target
ext/spl/SplDoublyLinkedListBuiltin.php — soft-null via VmMath::parseZParamLongBuiltinArgForFrame (or shared coerceIndex DEP path)
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_dllist_add_null.php'
Done when
Category
Regression:· php-src-strict · SPL soft-nullProblem
SplDoublyLinkedList::add(null, $v)under non-strict types must emitE_DEPRECATED("Passing null to parameter #1 ($index) of type int is deprecated") and insert at index0. VM throwsTypeError.Sibling:
offsetSet(null)already appends without DEP (#31731);addusesZ_PARAM_LONGand soft-deprecates.Probed 2026-08-17 — host Zend PHP 8.2+ vs
php bin/vm.php.$l->add(null, 'x')after one pushE_DEPRECATED+ insert at 0TypeErrorArgument #1 ($index)php-src reference
ext/spl/spl_dllist.c—zim_SplDoublyLinkedList_add/Z_PARAM_LONGPHP implementation target
ext/spl/SplDoublyLinkedListBuiltin.php— soft-null viaVmMath::parseZParamLongBuiltinArgForFrame(or shared coerceIndex DEP path)Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_dllist_add_null.php'Done when
E_DEPRECATED#1 ($index)and inserts at 0