Declined. Voting closed on August 11, 2026 with 14 in favor, 12 against and 7 abstaining. That's 54% support against the two-thirds majority it needed.
Adds a |>= operator so $x |>= trim(...) pipes a variable through a function and assigns the result back.
This poll has closed.
Declined. Voting closed on August 11, 2026 with 14 in favor, 12 against and 7 abstaining. That's 54% support against the two-thirds majority it needed.
PHP 8.5 added the pipe operator (|>), and a common way to use it is to pipe a variable through a few functions and assign the result back to the same variable. This RFC from Caleb White proposed |>=, a compound assignment version of the pipe, in the same family as +=, .= and ??=. It was declined.
$x |>= callable means the same thing as $x = $x |> callable. When the right side is a pipe chain, the variable goes in at the start of the chain:
// Today $this->requestData = $this->requestData |> array_filter(...); $input = trim($input) |> strtolower(...); // With |>= $this->requestData |>= array_filter(...); $input |>= trim(...) |> strtolower(...);
It would have worked on anything that takes compound assignment today: plain variables, array keys, object properties and static properties. Every callable style |> accepts would work too, including partial function application like str_replace('a', 'b', ?). Arrow functions would need parentheses, the same as with |>.
The RFC also points out a small correctness win. With $arr[expensive_call()] |>= strtoupper(...), expensive_call() runs once. Written out as $x = $x |> ..., the left-hand expression gets evaluated on both sides of the assignment. That's the same guarantee ??= gives you over $x = $x ?? $default.
Nothing. |>= is a syntax error in every PHP version today, so the RFC had no backward compatibility breaks. The tokenizer would have gained a T_PIPE_EQUAL constant, and IDEs and static analyzers would have needed to learn the new token.
With the RFC declined, you keep writing $x = $x |> .... The RFC also links a competing proposal, the left-to-right assignment operator, which wants the same |>= token for something else.