Ask HN: Why Isn't PHP Dead Yet?
PHP Should Be Dead… So Why Are Developers Still Building Amazing Apps With It?
Everyone loves to dunk on PHP. New devs sneer at it. The community treats it like a relic. Even after its latest update, many still consider it a "bad" language.
And yet… people keep using it. Not just using it—building successful, scalable, money-making applications with it.
If PHP is so awful, why hasn’t it died? What’s keeping it alive while so many other languages have faded into obscurity?
Let's hear it—why is PHP still standing?
43 comments
[ 2.7 ms ] story [ 83.5 ms ] threadIf someone says server-rendered HTML doesn’t scale or hurts conversion, or that we truly need a SPA to maximize sales - just point to Amazon and eBay, as proof that’s baloney.
Most colloquial programmer wisdom, I have learned, is baloney.
That's my contribution from https://hiandrewquinn.github.io/til-site/posts/php-is-web-sh... in addition to the other stuff folks are saying here.
An engineer should be able to solve any problem given any tool. Unlike other disciplines, when we are given a hammer everything does become a nail.
But a bad engineer will strike the hammer poorly and bend the nail, and blame the hammer.
why else wouldn't I love her?
Any language has potential to have horrible or wonderful code written in it.
However, I learnt ton of languages after I learnt PHP. That shouldn't be an issue.
On your question, PHP is alive because of the same reasons why FORTRAN and even COBOL alive. It's useful.
A huge community is also a major plus point.
And the foremost point is because of WordPress which run on PHP, it's empowers 62.8% of the web including big sites like Tech Crunch.
Third and more practical one is because of old conservative developers who are very resistant to change.
Also it is supported by many web hosting provider by default, due to its availability and integration with cpanel and WHMCS. Thus many personal blog owner prefer php.
Says who ? PHP works. Has a great ecosystem. A hell of a lot more stable than JavaScript ecosystem and package management. Tons of investment in frameworks like Symfony and Laravel. Great out of the box Hosting options. It just works. Upload index.php and boom. Then you have the beast: WordPress.
Don't get me wrong. I like other languages too (except JavaScript). There is a place for every language and PHP is no different.
I honestly think that PHP haters are just jealous because its supposed to die (in their own minds) but they are not able to accept that it is everywhere.
Says the likely majority of us who've only experienced WordPress.
The experience of having to fix your companies hodge podge of dubious quality plugins in an antiquated code base. Then there's the legacy PHP applications...
I'm not actually rejecting your point as such, Laravel is on my to look kick the tires list and modern PHP looks fine but I can empathise with anyone that comes out with the impression its an awful technology.
"I like other languages too (except JavaScript)."
Situation seems similar come to think of it, ~ last 5 years of tooling & language features compared to what it was 10 years ago might as well be different language & ecosystem. Not suggesting everything is fixed in JS/TS land but as long as you remain dubious of anything from Vercel or Meta things aren't that bad.
This might be the most accurate answer in the thread lol. It's like the river and the sea, there's just a barrier between them with entirely different ecosystems.
There's lots of onramps, like shared/control panel hosting where it will just be there and/or wordpress where you want a customizable blog and now you're writing php.
There's a middle ground of frameworks and stuff.
You can write pretty darn fast web pages with just the php language if you're careful.
PHP extensions aren't the easiest language extension I've used, but you can really speed some stuff up if you need to, or interface with libraries/functions that don't have a php interface already.
And then if you're facebook, you can do Hack.
Sure, people love to hate it, but it's going to stick around for a long time because it's good enough, it's very available, it works at all these levels, and it's not tied to any particular enterprise.
Sure there are fast ways to get MVPs out with other languages like Vercel for JavaScript etc. But that is not cheap. And sure you can get a pretty cheap VPS but setting it up for anything non-static websites is time consuming and has potential for errors.
With PHP, you can have your proof of concept out in public for almost free and almost immediately. And once it is working, why bother rewriting the app in a better language unless you run into some kind of limitation.
I don't know what 99% of the internals of Rails is doing, but boy howdy I can outship you every day of the week using Rails compared to any custom setup.
Rails/Laravel == I want to make money. 100% Custom code == I want to build something intellectually gratifying.
I won't say they're never the same, but very VERY rarely is that the case.
I think most of people saying that other languages are “better” are just repeating outdated information.