4 ms·
If you ignore things like Wordpress, my guess is that today it's often used by organizations whose flagship product was originally written more than a decade ag
by kgeist 5y ago
If you ignore things like Wordpress, my guess is that today it's often used by organizations whose flagship product was originally written more than a decade ago, back when PHP was the go-to language for web development (see: Facebook, Wikipedia, Tumblr etc.) and now that there's an ecosystem around this flagship product, new projects/services may as well be started in PHP, because that's what everyone is comfortable/familiar with. Otherwise, it looks like PHP isn't a very popular choice nowadays for new projects, especially if it's a new company.
Take our company for example, our flagship web product was developed more than a decade ago, and, well, today we still use PHP, because rewriting everything in a different language is a gargantuan task. It's not only about the language itself, but also about all the tooling/best practices etc. around it, which you have to replace, and it's costly. We do gradually modernize our code to remove all the PHP5-era warts, and it's much easier to accomplish than switch to a different language entirely. Modern PHP7+ with Symfony is very pleasant to work with, and in my opinion, from the productivity standpoint, there's really no reason to switch to anything else. Also, PHP7+ seems to be faster than Python/Ruby in raw interpreter speed. However, we realized that we can't scale further if we stay with our PHP/Symfony monolith for everything because of Symfony's considerable startup overhead, so we now try to write new services in Go (request processing is usually 10 times faster for our loads), and seems like the combo PHP+Go is very popular among PHP developers in general.
So, I'd say, PHP isn't "dead" and is still widely used in 2021, however, in my opinion, its usage is indeed dwindling, because there seems to be a trend even in our own PHP community to gradually supplement/replace/augment parts of our projects with services written in Go, and PHP is more and more frequently equaled to "legacy"/"monolith".