3 ms·
Another huge problem is the lack of typing for arrays. Considering the prevalence of array types in PHP, this considerably reduces the available safety. Basic
by the_duke 7y ago
Another huge problem is the lack of typing for arrays.
Considering the prevalence of array types in PHP, this considerably reduces the available safety.
Basically your only option is to use only classes for keyed arrays, and array wrapper classes like `MyClassArray` with typesafe methods like `push` and `get`.
Typescript solves this beautifully generics and interface types.