feat: add pipe assignment operator (|>=)#22633
Open
calebdw wants to merge 1 commit into
Open
Conversation
2d61f14 to
b933907
Compare
NickSdot
reviewed
Jul 8, 2026
NickSdot
left a comment
Contributor
There was a problem hiding this comment.
Got this review myself so it caught my eye.
b933907 to
46028af
Compare
Contributor
You must do it by yourself after karma points will be granted to you. FYI: your email landed in my Gmail mailbox to spam. https://news-web.php.net/php.internals/131804 |
Author
|
Contributor
No idea, honestly. Google fights with ProtonMail around this topic, and it's quite long concern. You can check 4 years old topic here: https://www.reddit.com/r/ProtonMail/comments/v26rhi/proton_mail_emails_going_to_spam/ |
TimWolla
reviewed
Jul 8, 2026
46028af to
4253972
Compare
TimWolla
reviewed
Jul 8, 2026
Adds the `|>=` compound assignment operator for the pipe operator, allowing `$x |>= callable` to be used as shorthand for `$x = $x |> callable`. Supports pipe chains on the RHS: `$x |>= fn1(...) |> fn2(...) |> fn3(...)` is equivalent to `$x = $x |> fn1(...) |> fn2(...) |> fn3(...)`. Implementation modeled after `??=` (ZEND_AST_ASSIGN_COALESCE), with a dedicated AST node (ZEND_AST_ASSIGN_PIPE) and compiler function that uses memoization to avoid double-evaluating complex LHS expressions. Extracts shared callable dispatch logic into zend_pipe_build_fcall() helper used by both `|>` and `|>=` compilation. All variable target types supported: simple vars, array dims, object properties, static properties.
4253972 to
2db203c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
(aka, the weightlifter operator)
RFC: tbd (as soon as I get them wiki karma, username
cdwhite3)Thanks!