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
by-ref foreach storing a fresh object per element: both elements report object id #1 (php #3 and #1) #72
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_object_ids.php — bash tests/aot/xfail.sh -k foreach_byref_object_ids reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Root cause, seen while working on #101: the object id is not computed at all — LowerPrelude::dumpObjectSrc emits the literal #1 in every var_dump object arm (object(Foo)#1 (…)), including the __debugInfo and stdClass arms. So this is not specific to by-ref foreach: $a = new P; $b = new P; var_dump($a, $b); prints #1 twice (php: #1, #2), while spl_object_id() answers correctly.
Scope: object handle ids.var_dump hardcodes #1; there are no real object handle ids and no free-list reuse, so #3 / #1 cannot match php. Fix: allocate a handle id per object (with a free list on destruct) and print it in var_dump/spl_object_id. 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 6, 2026
Root cause, seen while working on #101: the object id is not computed at all —
LowerPrelude::dumpObjectSrcemits the literal#1in everyvar_dumpobject arm (object(Foo)#1 (…)), including the__debugInfoandstdClassarms. So this is not specific to by-refforeach:$a = new P; $b = new P; var_dump($a, $b);prints#1twice (php:#1,#2), whilespl_object_id()answers correctly.blacktrs commentedon Oct 13, 2026
Scope: object handle ids.
var_dumphardcodes#1; there are no real object handle ids and no free-list reuse, so#3/#1cannot match php. Fix: allocate a handle id per object (with a free list on destruct) and print it in var_dump/spl_object_id. Found in batch E; skipped.