Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bufferoverflow
· 6y ago · 0 comments
I don't think there's an ambiguity, since the key-value application of that operator only happens inside the array definition or when you do
foreach ($x as $k => $v) {}
.
Comments
[–]
TimothyBJacobs
6y ago
There is ambiguity. This was specifically mentioned in the RFC for the feature:
https://wiki.php.net/rfc/arrow_functions_v2#syntax
[–]
Izkata
6y ago
It does if you're trying to make an array of anonymous functions...