stanislav-janu's avatar

Stanislav Janů

stanislav-janu

Member since

20

Total Reputation

1

Total Arguments

2

Total Votes for Arguments

Arguments and votes

1

It's nice to have.

Share:
Read the RFC: The Pipe Operator stanislav-janu avatar
stanislav-janu
voted yes
7

I think this would be a great improvement.

I prefer this:

$result = "Hello World"
    |> htmlentities(...)
    |> str_split(...)
    |> fn($x) => array_map(strtoupper(...), $x)
    |> fn($x) => array_filter($x, fn($v) => $v != 'O');

instead of this:

$result = "Hello World"
    |> 'htmlentities'
    |> 'str_split'
    |> fn($x) => array_map('strtoupper', $x)
    |> fn($x) => array_filter($x, fn($v) => $v != 'O');
Share:
Read the RFC: The Pipe Operator william-2 avatar
william-2
voted yes
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!