> But does the syntax really collide?
Yes.
$a = [ $x => $x * 2 ];
Is this an array mapping the key $x to the value $x * 2, or is this an array mapping the key 0 to a function that doubles its input?
Re:25 Years of PHP [video]
by francislavoie on Sunday September 08, 2019 @05:13PM
(#20913454)
It's all covered here in the discussion section: https://wiki.php.net/rfc/arrow_functions_v2
I would think that this:
clearly should create an array with an elemnt that is a function and has the key 'doubler'. Where is the problem?2: And how about just using some other char combination?
Or something like that.