News for hackers. Stuff that matters.
Re:PHP 8.5 Adds Pipe Operator: What it means by ufo on Tuesday August 05, 2025 @01:30PM (#44801232)
The problem they were discussion in the linked Github issue are pipelines where the functions receive more than one argument.

    const x = fun1(a, 10)
    const y = fun2(x, 20)
    const z = fun3(y, 30)
In this case the pipeline version would create a bunch of throwaway closures.

    a |> ((a) => fun1(a, 10))
      |> ((x) => fun2(x, 20))
      |> ((y) => fun3(y, 30))

There are no comments on this comment yet.