Hi! > I had this RFC in draft since some time, but delayed it due to all > the ongoing PHP 7 discussions. Also we have no master branch to merge > features in until 5.4 EOL. Thus I'm reviving this now. > > Time for the first RFC targeting PHP 7.1 (assuming PHP 8 isn't going > to be the next version ;-)): > > The short Closures RFC: https://wiki.php.net/rfc/short_closures
I personally don't see much advantage in making PHP code less readable and harder to parse. Also, "automatically use () all of the (compiled) variables" does not look like a good idea - first, users have no idea what compiled variables are, so the result would be unpredictable for them, second, if there are a lot of variables in the scope (like global scope) it would have huge performance costs for no gain. Also, this syntax does not allow "use by-ref" which the existing syntax does allow. I think we already have syntax for anonymous functions and it works. The only addition in this RFC is automatically gobbling up all local variables, which in vast majority of use cases is not what the function needs. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php