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
{{ message }}
Repository navigation
array_shift inside a by-ref foreach diverges from php #41
area:runtimeRuntime: shutdown, traces, collectorbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Known-bug repro: tests/aot/repro/wrong/foreach_byref_array_shift.php — bash tests/aot/xfail.sh -k foreach_byref_array_shift reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Scope: needs a live-iterator registry. php adjusts the position of live foreach iterators when array_shift renumbers the array being iterated by reference. We have no registry of active by-ref foreach positions, so there is nothing to adjust. Fix: register by-ref foreach cursors per array and let array_shift/unshift/splice patch them. Found in batch E; skipped.
area:runtimeRuntime: shutdown, traces, collectorbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Activity
blacktrs commentedon Oct 13, 2026
Scope: needs a live-iterator registry. php adjusts the position of live foreach iterators when
array_shiftrenumbers the array being iterated by reference. We have no registry of active by-ref foreach positions, so there is nothing to adjust. Fix: register by-ref foreach cursors per array and let array_shift/unshift/splice patch them. Found in batch E; skipped.