[RFC] Arrow Functions
| From: | Levi Morrison | Date: | Fri, 02 Oct 2015 23:17:19 +0000 |
| Subject: | [RFC] Arrow Functions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-88651@lists.php.net to get a copy of this message | ||
I messaged the list about this feature before I had the RFC written up
for it. The RFC[1] is slightly different from what I proposed in the
previous thread, so please read the RFC to make sure you understand
what is being proposed before replying here.
Here's a small example:
$y = 10;
$result = array_map(function($x) => $x + $y, [1, 2, 3]);
// $result is [11, 12, 13]
Thanks for people who have participated in conversation so far, as
well as those who participated in Bob's short closures proposal as
well.
[1]: https://wiki.php.net/rfc/arrow_functions