Re: [RFC][Discuss] Arrow Functions
| From: | Alain Williams | Date: | Tue, 31 Jan 2017 12:20:56 +0000 |
| Subject: | Re: [RFC][Discuss] Arrow Functions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98074@lists.php.net to get a copy of this message | ||
On Tue, Jan 31, 2017 at 01:06:25PM +0100, Nicolas Grekas wrote:
> Or just drop any "fn" or "function" keyword, eg
>
> ($x, $y) => foo($x, $y);
>
> array_map(($x) => $x + 1);
That has the great advantage of being much as Javascript does this.
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>