Re: [PHP-DEV] [RFC] Pipe Assignment Operator

Hi

On 2026-07-10 06:45, Caleb White wrote:

I'd like to open discussion on my (first!) RFC for the pipe assignment operator (|>=):
PHP: 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:
feat: add pipe assignment operator (`|>=`) by calebdw · Pull Request #22633 · php/php-src · GitHub

Quick note regarding formalities: The voting widget was missing the “Abstain” option, which I just added for you.

I haven't yet looked at the RFC contents.

Best regards
Tim Düsterhus

On Monday, July 13th, 2026 at 09:11, Tim Düsterhus <tim@bastelstu.be> wrote:

Quick note regarding formalities: The voting widget was missing the
“Abstain” option, which I just added for you.

Ah thanks! I just modified the template though, so that probably needs to be updated as well.

Caleb

Hi

On 2026-07-13 16:24, Caleb White wrote:

Ah thanks! I just modified the template though, so that probably needs to be updated as well.

It's already in the template at PHP: rfc:template (since 2025-08-31, when the “Abstain” RFC passed). Unsure what happened, the rest of your RFC seems to match the current version of the template, particularly the “RFC Impact” section which also got recent updates.

Best regards
Tim Düsterhus

On Monday, July 13th, 2026 at 09:34, Tim Düsterhus <tim@bastelstu.be> wrote:

It's already in the template at
PHP: rfc:template (since 2025-08-31, when
the “Abstain” RFC passed). Unsure what happened, the rest of your RFC
seems to match the current version of the template, particularly the
“RFC Impact” section which also got recent updates.

Hmm, not sure---could have accidentally deleted the line in Neovim
prior to copy/pasting. Thanks again for catching that!

Best,
Caleb

Ooooh, fun. Can we informally call |>= the “volcano operator” (like ?: is the Elvis operator)?

…if only Hershey’s Kisses had two paper strips coming out of the top.

mickmackusa

On 7/13/26 09:45, mickmackusa wrote:

Ooooh, fun. Can we informally call |>= the "volcano operator" (like ?: is
the Elvis operator)?

...if only Hershey's Kisses had two paper strips coming out of the top.

mickmackusa

I like to think of |> as the volcano operator, while |>= is the erupting volcano operator.

:wink:

Cheers,
Ben

I won’t get to vote on this RFC, but I wanted to give my brief opinion. To be fair, my initial opinion was that I loved the symmetry of this along with `+=`, `-=`, and similar operators, but really hated how I assumed it was likely be used. I started typing up a message showing examples of how it could be used, but as I did I fell in love with it.

It’s a little annoying to type on the standard US Keyboard layout, but its readable as a syntax and has a clear meaning once understood. This is the example that made me really love the <<Exploding Volcano>> operator (with PFA):

$array |>= array_map(transform(…), …);

Holly