4 ms·
> It has strong typing, not just hints in comments Even for arrays?
by Shish2k 2y ago
> It has strong typing, not just hints in comments
Even for arrays?
- gregjor 2y agoPHP arrays are ordered maps, not arrays of a homogenous type as in Go or Java. Array is a type in PHP, but all arrays have the same type, regardless of what they contain. You can describe the expected value or key/value types of an array in PHP doc comments for IDEs and static analyzers, but PHP won't enforce those.