The great thing about this pipe operator is that it accepts any callable expression. I’m writing a library to make these array and string functions more expressive.
For example, in php 8.5 you’ll be able to do:
[1,1,2,3,2] |> unique
And then define “unique” as a constant with a callback assigned to it, roughly like:
Putting the delimiter on a line of its own is a syntactical trick that helps bringing small additions down to a neater 1-line diff instead of a 2-line diff. You've probably run into it many times before in other contexts without thinking of it. Arrays/hashes, quoted multi-line strings etc.
// <- wtf
This comment was my $0.02.