Hello, Caleb.
Firtly, i’d like to point out that you aren’t the first person to come up with the idea of combining assignment and pipeline operators, and inroduce `|>=` operator
Take a look at discussion, php.internals: Proposal. Pipeline assignment operator . RFC draft is here php-rfc/ltr-assignment.md at main · vadimonus/php-rfc · GitHub.
I haven't submitted these drafts as an RFC yet because I haven't received enough positive feedback on the first RFC in the chain: PHP: rfc:pipe_to_return. You can see another drafts in github.
The main idea, is that pipe operator reverses traditional funcation call reading order, so we need some more operators with same order to use together to reduce cognitive load.
Your variant of this operator makes traditional rigth to left action, like other action. But `|>` arrow visually defines opposite direction. This may lead to incorrect perception, increase cognitive load and lead to mistakes.
I think, all extensions of pipe operator should be ducsussed together to intorduce non conflicting group of operators. Please add to your RFC links to other discussions and theese RFC drafts.
10.07.2026 11:45, Caleb White пишет:
Hi internals,
I'd like to open discussion on my (first!) RFC for the pipe assignment operator (|>=):
PHP: rfc:pipe_assignment_operatorIt adds a compound assignment form of the pipe operator, so that
$x |>= callable is shorthand for $x = $x |> callable, with
support for chaining. Implementation with tests is at:
feat: add pipe assignment operator (`|>=`) by calebdw · Pull Request #22633 · php/php-src · GitHubLooking forward to your feedback.
Thanks!
Caleb
--
--
Vadim Dvorovenko