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

-1

None

-1 on both syntax

None

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

+1

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

-1

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