In PHP, are these identical? $x = [1,2,3];
and $x = array(1,2,3);
Are there cases where these two methods of creating an array differ?
Is there any reason to use one over the other?
They are identical with the caveat that $x = [1,2,3];
requires PHP >= 5.4.0.