3 ms·
There's no reason for arrays to be objects if PHP wants to be a procedural language like C. In the days of PHP4 it was a procedural language and that design mad
by zarzavat 5y ago
There's no reason for arrays to be objects if PHP wants to be a procedural language like C. In the days of PHP4 it was a procedural language and that design made total sense.
However nowadays nobody uses PHP as a procedural language, they use it as an object-oriented language. In that context it is extremely strange to have this procedural API still hanging around for "old" types.
- kyriakos 5y agoThe only problem I see is that array functions are in global scope and not namespaced. Other than that having primitive types doesn't hurt.