PHP array square brackets and array() difference

Php difference between square brackets and array():



Let go through the example:

'body'=>[
'options'=>['ids'=>[0=>$id]]
]

This is equivalent to:

'body' => array(
        'options' => array('ids'=> array(0=>$id))
)


Comments