Michael Maclean wrote:
https://wiki.php.net/rfc/shortsyntaxforarrays

Since this was brought again recently by Rasmus

<snip>

I'm all for this, though I would confess to having a preference for the
second syntax:

$arr = [ 'foo' => 'bar', 'baz' => 'foo' ]

seems to fit better with PHP than the other one, JSON-compatibility aside.

Keeping the => does make a lot more sense since it differentiates that PHP CAN do things here that simply do not work in JSON? This ONLY works with JSON when one takes the care to avoid associative arrays, and => in my mind has always been 'associate' ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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

Reply via email to