> > Making a special kind of array _value_ that must stay a “list” sounds > more problematic… I think without automatic casting back and forth from > regular “arrays” it might play badly with existing code, but then there > would be no point… >
Makes sense – then conversion from lists to arrays would happen the same way $some_int += $some_float converts $some_int to a float. _If_ there was a list type then it would make sense to add a corresponding is_list runtime check, and users would be able to typehint their functions as returning a list, and get an error if the function actually returned a (non-list) array.