PHP is somewhat romanticized. It’s a bit like saying that using COBOL is right choice just because half of the U.S. banking system runs on it. When you look at PHP, the syntax leaves much to be desired. There are hardly any proper data structures, an array is just an awkward hybrid of a hash table and an array. I’ve often run into issues when working with them. Type definitions only exist for primitive fields and parameters, for everything else (deep data structures, such as array of some class instances), you have to rely on doc comments. Languages like Dart, Kotlin, and even TypeScript (with strict type checking options) are much more pleasant to work with when the code is complex and types are important. That being said, PHP has some architectural advantage, such as one thread running per request, which makes PHP sites significantly more robust by default, so it might be more tolerant to some types of bad code (for example, code that might cause hanging or excessive use of memory).
Here is my opinion about PHP: https://waspdev.com/articles/2025-06-12/my-honest-opinion-ab...