Skip to content

Language: keyed list destructuring (["a" => $x]) (#1234) - #1317

Merged
PurHur merged 1 commit into
masterfrom
issue-1234-array-destruct-keys
May 24, 2026
Merged

PurHur merged 1 commit into
masterfrom
issue-1234-array-destruct-keys

Conversation

@PurHur

@PurHur PurHur commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • php bin/vm.php -r '["a" => $x] = array("a" => 1); echo $x;' → 1 (tar-pipe Docker)
  • VM compliance: keyed_list_destruct.phpt passes in full compliance suite (tar-pipe Docker)
  • JIT lowering for string-key destructuring split blocks (follow-up; integer-key / short-list JIT unchanged)

Closes #1234

Made with Cursor

String-key array literals before ["key" => $x] destructuring split the
compile block for AOT; successor frames lost the array temp until slot
values were inherited from the jump predecessor. Simplify the split to a
single jump and add a compliance PHPT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 06219c3 into master May 24, 2026
@PurHur
PurHur deleted the issue-1234-array-destruct-keys branch May 24, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language: array destructuring with keys (["a" => $x])

1 participant