Hacker News new | ask | show | jobs
by oaiey 1679 days ago
Except Facebook literally did that :)

But I agree with you.

3 comments

Wikipedia too. And probably many WordPress websites with a lot of traffic.

If anything, PHP has proven it works in this regard.

Facebook and Wikipedia were both founded ~20 years ago, think they would make that same decision today?

PHP works, but imho starting a new company or career with PHP is a mistake.

I don't know, why not?

Why would it be a mistake?

On the one hand I have a few examples of huge, successful projects written in PHP and I know they are still around 20 years later and haven't been rewritten in another language. I use projects in PHP on a daily basis (Nextcloud, Rainloop, Wordpress) that work well and have been maintained for years. On the other hand I have a few comments calling out PHP without convincing arguments. Something is wrong.

I practice Python and Javascript daily, I've written PHP code 10 years ago, still use some of my code. I occasionally update PHP code on a website I manage. I've seen good things in the new versions.

Should I begin a new project today, I would not rule out PHP that fast. I like Python and Typescript, but PHP projects are often a breeze to install (unzip, done) and survive system upgrades and reboots easily as long as php-fpm runs. Projects in other languages need more babysitting. I know, I also use web software in other languages, including one I author.

PHP is dead simple to write too.

I would probably go for nodejs for something that requires Websockets or SSEs (or a compiled language). Otherwise, I'd seriously consider PHP because it does not require setting up something like uwsgi or celery, write reverse proxy rules, write init service files or running Docker. Put the files in www and it's done. Also no code for managing routes, the file system organization does this for me. No memory leaks, everything is thrown at the end of each request. The architecture is robust.

Couple reasons:

* It's waning in popularity, new programmers aren't being taught and there isn't a lot of incentive for them to seek it out * Other languages are also good at making websites but many are more popular and more flexible - machine learning, video games, front-end web development, enterprise services (and sure PHP can be "enterprise" but many new cloud/apache projects are java first)

So yeah, I'm not saying PHP is dead...just that it's not a good investment for new developers and it's questionable for new projects.

Also Slack, Etsy, Baidu (4th most visited site on the planet), Box, MailChimp, Spotify to name a few more that seem to be doing ok.
Yep, almost 20 years ago and it's been both a technical and hiring problem for them ever since.
Is there any large tech company without technical and hiring problems?
Why make it worse by choosing backend-only web languages with bad reputations?