2017-01-31 13:20 GMT+01:00 Alain Williams <a...@phcomp.co.uk>:

> 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
>
>
IMO it'll be hard to detect arrow function then.
Consider an example:

$y = 'a';
$x = 1;
$a = [
    $y => 'b',
    ($x) => $x + 1,
];


> --
> 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
>
>


-- 
regards / pozdrawiam,
--
Michał Brzuchalski
about.me/brzuchal
brzuchalski.com

Reply via email to