Dan Cryer wrote on 03/09/2015 11:40:
Out of interest, is there a technical reason you couldn't use an existing
token, such as => for this?

https://wiki.php.net/rfc/short_closures#symbol_choice

In particular, note that this is already valid code:
[$x => $x * 2]
(A one-element array, specifying the key)

But with the proposal, this would also be perfectly reasonable:
[$x ~> $x * 2]
(A one-element array containing a closure)

So clearly they couldn't share the same syntax.

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to