rfc:shortsyntaxforarrays:vote
This is an old revision of the document!
Square bracket array shortcut - keys and values are separated by colons
$a = [1, 2, 3]; $b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon'];
+1
- shein
-1
None
Square bracket array shortcut - keys and values are separated by double arrows
$a = [1, 2, 3]; $b = ['foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon'];
+1
- zeev (would consider parentheses for max compatibility with current syntax, minus the array keyword, i.e. (1, 2, 3))
- patrickallaert
- colder
- pierrick
- aharvey
- gwynne
- tyrael
- pajoye
- chregu
- dsp
- salathe
- rdohms
- guilhermeblanco
- davidc
- hartmut
-1
None
-1 on both syntax
- cataphract
Current votes, but without info about which syntax to choose:
+1
- mgf
- kalle
- brianlmoon
- stas
- iliaa
- rasmus
- shiflett
- fmk
- cstockton
rfc/shortsyntaxforarrays/vote.1307031186.txt.gz · Last modified: 2025/04/03 13:08 (external edit)