PHP is often the butt of jokes online, but I've always thought that quite unfair. Turns out, that I am certainly not the only one, as outlined in this article 'The Internet of PHP' where I learn that PHP is powering 77.2% of the top 10 million website backends, with the next contender being ASP.NET at a measly 6.9%. A large amount of this is Wordpress (obviously), but either way, it's a huge amount of the web and to me the summary of this article captures why:
There are languages that are even faster (Rust), have an even larger community (Node.js), or have more mature compilers (Java); but that tends to trade other values.
PHP hits a certain Goldilocks sweetspot. It is pretty fast, has a large community for productivity, features modern syntax, is actively developed, easy to learn, easy to scale, and has a large standard library. It offers high and safe concurrency at scale, yet without async complexity or blocking a main thread. It also tends to carry low maintenance cost due to a stable platform, and through a community that values compatibility and low dependency count. You will have different needs at times, of course, but for this particular sweetspot, PHP stands among very few others.
There is another thing unmentioned here: Because of this large community, stability and ease of use, it also is well practiced by Chat-GPT and Github Codex. The training data is well-fed and familiar with popular frameworks like Laravel and even libraries such as Filament. I've found Chat-GPT's AI pair programming fluency to be of higher quality than that of Node and Python - perhaps because the language has undergone less changes over the recent years.
For me PHP is a good choice for static sites requiring a CMS, blogs and enterprise style software, (e.g. anything involving dashboards, tables etc). It's not always the best choice for these projects (h/t Python with Django), but it's a certainly worthy contender. That being said I was still slightly surprised at how insanely popular it is!