HACKER Q&A
📣 01-_-

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?


  👤 codegeek Accepted Answer ✓
"PHP should be dead"

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.


👤 toast0
PHP isn't dead because it's a language that can meet you where you are.

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.


👤 babyent
There are no bad languages. Only bad engineers.

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.


👤 soumikmahato
PHP is already in mature stage, it has integrated support for many libraries like MySQLi, PDO, curl etc.

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.


👤 matt_s
Replace PHP in your post with most any other older open source language and its likely the same reasons: it works, there's lots of docs, the community is huge, there's a large ecosystem, etc.

Any language has potential to have horrible or wonderful code written in it.


👤 solardev
It's pretty likely a PHP site written 5 years ago still works fine today. Javascript? No way.

👤 hilti
It's easy to deploy. A lot works out of the box without having to install any 3rd party libraries (PDO database access, CURL, file and directory management, session management etc.) And for most tasks it is fast enough.

👤 shams93
Once people realized its actually more secure and performant than java you saw big companies using it such as Disney Parks. This was new they had been using java for at least a decade before moving to php for developer productivity. I used to write java for them and you had only a test server, you had to know the language well because you had to wait 30 minutes for your servlet to compile in a compile wait list on the server. With php you could easily test locally, and they used php off the shelf so you no longer needed to know all the quirks of Disney's proprietary Tea servlet templating system.

👤 anon743448
PHP is the fastest and cheapest way to get MVP out the door.

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.


👤 hiAndrewQuinn
PHP is worth at least having a passive familiarity with for the same reason Bash is, at least if you're in the web dev world.

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.


👤 marto1
It made a lot of really good choices in the late 90s when a lot of dot-com companies started and a lot of people around the world started getting interested in making their own websites. It eventually snowballed to the LAMP stack which became the most user friendly way of doing stuff on the web on low budget. The inertia from this is massive so it's staying for a bunch more years.

👤 bediger4000
Because it's not really that awful. You can knock out something useful very quickly, and if you're careful and have a little discipline, you can indeed maintain it. The almost infinite library probably has something to do with it, as does a teeming mass of developers that have a familiarity with PHP.

👤 bloomingkales
So long as there is something that loves something, that something will exist. You can keep anything alive if you heart wants to. Some people really love PHP, and that's kinda beautiful.

👤 icedchai
With frameworks like Laravel, PHP can be super productive, especially for basic CRUD apps. Also, it is incredibly simple to deploy compared to a more "modern" cloud stack.

👤 yulaow
easy to deploy, latest versions of the language are ok, has some of the best web frameworks to work with, absurd amount of experienced programmers can be found on the market

👤 zepolen
Because it's easy to deploy, that's the only reason.

👤 krapp
¯\_(ツ)_/¯ The only languages no one hates are the ones no one uses. Hating PHP is a mostly a meme and an elitist virtue signal, and people still use it because it still works. Simple as.

👤 quintes
PHP works, quick to build quick to deploy

👤 ActorNightly
Because language doesn't matter.

👤 keiferski
One word: WordPress.