top | item 6279731

(no title)

lysol | 12 years ago

Another thing I didn't notice earlier, after perusing the implemented RFCs: More Python-like array syntax:

[1, 2, 3] ['key1': 'val1', 'key2': 'val2']

We've been on 5.4+ at work for some time now and if I'd know that a year ago it would've saved me a lot of array()s and visual noise.

discuss

order

adduc|12 years ago

The colon-based syntax was voted down.

What went live in 5.4 was support for brackets in lieu of array()

    // Typical array syntax
    $arr = array('key' => 'asdf');

    // Supported in 5.4+
    $arr = ['key' => 'asdf'];