Caleb White has introduced a new RFC to implement a pipe assignment operator in PHP. The proposal introduces the |>= operator, which serves as a compound assignment shorthand for piping a value through a callable and assigning the result back to the same variable.
This new syntax allows for the chaining of multiple operations. To support the proposal, a pull request (PR #22633) has been submitted to the php-src repository, which includes the necessary implementation and a suite of tests.
Following the announcement on the internals mailing list, Tim Düsterhus noted a missing "Abstain" option in the RFC's voting widget, which has since been corrected to align with current PHP RFC templates.
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Waiting for your click …
·