a) Commit square bracket array shortcut patch
keys and values are separated by colons.
( http://www.opendogs.org/pub/php-5.3dev-080109-sbar.patch )
e.g.
$a = [1, 2, 3];
$b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon'];
Breaks from PHP's => for no apparent reason (one character too many
character this time?), which is just confusing (that's an implicit -1).
b) Commit square bracket array shortcut patch
keys and values are separated by double arrows.
( http://www.opendogs.org/pub/php-5.3dev-080109-sbar2.patch )
e.g.
$a = [1, 2, 3];
$b = ['foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon'];
Breaks backwards compatibility to save typing five characters. See
above. -1.
c) Reject and keep using `array()'.
e.g.
$a = array(1, 2, 3);
$b = array('foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon');
For all the above reasons, +1.
In my post i not write about variant "a)"
+1 too.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php