JavaScript, by contrast,
doesn't have arrays - it just has objects, which can have numerical keys.
a = []
a.foo = 'bar' // works!
b = {}
b[0] = 42 // also works!
I happen to think these designs are both INSANE, but even if you like them, PHP has no advantage here.