On 31.01.2017 at 19:16, Michael Morris wrote: > On Tue, Jan 31, 2017 at 12:29 PM, Larry Garfield <la...@garfieldtech.com> > wrote: > >> My question is why there's no mention of HHVM short closures, or the >> previous RFC to take that approach. See: >> >> https://docs.hhvm.com/hack/lambdas/introduction > > For what it's worth I'd rather look at > > array_map( $x ==> $x + 1); > > than > > array_map( fn($x) => $x + 1 ) > > Not to mention the former isn't a bc break.
Neither is supposed to work, though. :) Anyhow, I'm not sure whether I'd prefer array_map($a, $b, $c ==> $a + $b + $c, $a1, $a2, $a3) over array_map(fn($a, $b, $c) => $a + $b + $c, $a1, $a2, $a3) or maybe array_map(fn $a, $b, $c => $a + $b + $c, $a1, $a2, $a3) Somehow, I tend to like a trailing keyword for better left-to-right readability. -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php