News for hackers. Stuff that matters.
Re:PHP 8.5 Adds Pipe Operator: What it means by drakythe on Tuesday August 05, 2025 @10:12AM (#44798207)
I don't disagree with you. I had trouble reading the examples at first. But what immediately struck me is this syntax is pretty much identical to chaining object methods that return values.

  $result = $obj->query($sqlQuery)->fetchAll()[$key]
so while the syntax is not my favorite, it at least maintains consistency between method chaining and now function chaining (by pipe).
Re:PHP 8.5 Adds Pipe Operator: What it means by 8n4vidtmkvmk on Tuesday August 05, 2025 @01:03PM (#44800772)
Speaking of query builders, we no longer have to guess whether it's mutating the underlying query object or cloning it with each operation. That's another big win for pipe IMO.