Open RFCs

Property Hooks

A new way of interacting with properties

58% 42%
58
108 yes
77 no
The Pipe Operator

The "pipe operator" |> allows you to chain multiple function calls in a more convenient way.

68% 32%
89
260 yes
122 no
Short Closures 2.0

This RFC proposes a way to have multi-line short closures — closures that don't need explicit use statements, but can still have multiple lines and a return statement.

85% 15%
101
373 yes
66 no

Argument of the Day

82

With First-class callable syntax available since 8.1, it would now be possible to write it as below, which is much better then string names of functions:

$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 pronskiy avatar
pronskiy
voted yes
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!