Alain Williams <a...@phcomp.co.uk> schrieb am Di., 31. Jan. 2017, 13:20:

> 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


As noted in the RFC,  this isn't possible due to ambiguities with array
keys and yield expressions with keys.

Regards, Niklas


> --
> 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>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to