You can now write
$numbers = [1,2,3];
Or even $numbers = ['first' => 1, 'second', => 2, 'third' => 3];
I'd think the mixing of associative and sequential arrays are one of the key things that lowers the barrier to entry though.You can now write
$numbers = [1,2,3];
Or even $numbers = ['first' => 1, 'second', => 2, 'third' => 3];
I'd think the mixing of associative and sequential arrays are one of the key things that lowers the barrier to entry though.I'd think the mixing of associative and sequential arrays are one of the key things that lowers the barrier to entry though.
For me it fails the "similar things should look similar, different things should look different" test. Then again, they aren't really all that different in PHP. I guess it comes down to me preferring my sequential and associative data structures to be separate, which is a fairly fundamental difference to how PHP thinks it should be. I have a sneaking suspicion that the complexity this data structure tries to hide leaks out through the numerous functions used to interact with it[1], which just shifts the pain slightly farther down the line, and possibly from a one-time event (when learning the fundamentals) to a regular occurrence as it causes problems continually later.