There is of course situations where PHP isn't a good solution. I would prefer to use something else if something like websocket was important or if performance was critical.
PHP today has about as much in common with PHP from 2005 as today's javascript has in common with javascript from 2005. Languages change.
Such as? (Aside from inconsistency, it's indeed unbeatable at that)
PHP may be very inconsistent, but its syntax is also very stable. You don't need to spend hours rewriting your application to use the latest PHP version. I'm not sure if it may have been a good idea to have a "Python 3"-style release, maybe.
It doesn't maintain state between requests, and that is a perfect match for HTTP.
It's easy and fast to deploy. You don't need to restart things or think about reusing ports to update without downtime.
It's easy to sandbox, making hosting very cheap compared to most other languages.
It's basically "serverless" with really good startup times.
It has better performance than most other interpreted languages.
It has support for many functions that many other languages would require a dependency for.
Development speed quite fast as a result of the large amount of included things.
You can to some degree decide if you want to use strict types, or just ignore it.
It has a large ecosystem with multiple great, feature rich, and battle tested frameworks.
It's has very good backwards compatibility, and it's easy to upgrade large code bases to newer version.
It's documentation is the gold standard according to many.
While it's definetly not one of the coolest or most fun languages, it's definitely one of the greatest for the web. Doesn't PHP run something like 75-80 % of all websites today? Clearly it's doing something much better than others.
I am no latest tech only hipster kid, but making a fast no bloat website this day with modern JS stack is pretty darn easy.
For me it’s hard to evaluate cause I’ve been doing it for years but I’ve recently thought it to a couple of people with no coding experience and they got it.
Seriously, people are terribly close minded about the JS ecosystem and the fame is well deserved maybe but seriously if you have some minimum guidance of what to stick to it’s one of the best and easiest stacks around.
The cool kids dunk on both of them.
Are you talking about static websites, or API-driven? Can you put an example?