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

  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

  1. zeev (would consider parentheses for max compatibility with current syntax, minus the array keyword, i.e. (1, 2, 3))
  2. patrickallaert
  3. colder
  4. pierrick
  5. aharvey
  6. gwynne
  7. tyrael
  8. pajoye
  9. chregu
  10. dsp
  11. salathe
  12. rdohms
  13. guilhermeblanco
  14. davidc

-1

None

-1 on both syntax

  1. cataphract

Current votes, but without info about which syntax to choose:

+1

  1. mgf
  2. kalle
  3. brianlmoon
  4. stas
  5. iliaa
  6. rasmus
  7. shiflett
  8. fmk
  9. cstockton

-1

  1. cataphract
rfc/shortsyntaxforarrays/vote.1307027092.txt.gz · Last modified: 2017/09/22 13:28 (external edit)