Skip to content

Implement logical AND and OR assignment operators (&&=, ||=)#190

Merged
thekid merged 5 commits intomasterfrom
feature/logical-and-or-assign
Apr 23, 2026
Merged

Implement logical AND and OR assignment operators (&&=, ||=)#190
thekid merged 5 commits intomasterfrom
feature/logical-and-or-assign

Conversation

@thekid
Copy link
Copy Markdown
Member

@thekid thekid commented Apr 23, 2026

Implements feature suggested in #133. These operators are both in JS and baseline available.

  • Assignment to variables
  • Assignment to expressions like test()->result= ... without test() being re-evaluated

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND_assignment

thekid added 2 commits March 8, 2026 11:45
This prevents a parent::emitOne() call for each node
Comment thread src/main/php/lang/ast/emit/PHP.class.php Outdated
@thekid thekid merged commit 744fc78 into master Apr 23, 2026
16 checks passed
@thekid thekid deleted the feature/logical-and-or-assign branch April 23, 2026 18:53
@thekid
Copy link
Copy Markdown
Member Author

thekid commented Apr 23, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant