On Thu, Jul 9, 2026, at 11:45 PM, Caleb White wrote: > Hi internals, > > I'd like to open discussion on my (first!) RFC for the pipe assignment > operator (|>=): > https://wiki.php.net/rfc/pipe_assignment_operator > > It 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: > https://github.com/php/php-src/pull/22633 > > Looking forward to your feedback. > > Thanks! > Caleb
Perhaps weirdly, I am not a huge fan of this RFC. I'm open to pipe-compound operators (the other that's been suggested is a null-safe ?|>, which I'd support), but I'm not sure of the use case for this one. That may be because, from a functional programming point of view, piping a back to itself makes little if any sense. Values should be immutable, so you would be doing $b = $a |> foo(...) |> bar(...) |> baz(...); I cannot think of a case where I would want to put $a on the left side, too. How realistic is this use case? I don't think this RFC would cause any harm, I suppose, so I probably won't vote against it. But at the moment I don't see a compelling reason to vote for it. A concrete real-world use case would help make that case, because I cannot come up with one myself. --Larry Garfield
