It would be really great if they implemented the arrow functions RFC!
I came across it today because I'm a .Net+JS dev helping a colleague to write a PHP app talking to our API. And I knew he would need to do something like .Where from LINQ or .filter from JS.
So I found the PHP functions like array_filter, but with the long closures syntax it's just so much code! And like you say, you need the use () clause. It's messy. Arrow functions would be brilliant in PHP.
Thanks for the post!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It would be really great if they implemented the arrow functions RFC!
I came across it today because I'm a .Net+JS dev helping a colleague to write a PHP app talking to our API. And I knew he would need to do something like
.Where
from LINQ or.filter
from JS.So I found the PHP functions like
array_filter
, but with the long closures syntax it's just so much code! And like you say, you need theuse ()
clause. It's messy. Arrow functions would be brilliant in PHP.Thanks for the post!