Skip to content

PHP is Dead (and AI is to blame)

lifeofguenter.de
6 pointslifeofguenter9 comments
On HN

Comments

My professional life depends on PHP being alive (small hosting company). So I just have to comment and I am totally biased.

1st, of course good title for HN. But the article is indeed nuanced.

Sometimes lately, people announce to me, that they have built a SaaS App (vibe coded). When inquiring about the stack, they may not even now. It ends up to be what the AI thought will "get the job done" (Thanks for linking the response by Beberlei!). Indeed, AI seems to prefer Python and JS. That's concerning for PHP.

Yet. What I like about PHP is the simplicity. The backend can spit out HTML and it's server side rendered. When I compare that with all the setup that is required in JS to make that work - I think there is some space for this boring tech.

The rise in popularity of Laravel making it the de-facto choice of framework within PHP.

In the US.

What edge does PHP still have compared to other languages?

Horizontal scaling due to the nothing shared architecture: need more perfs? Add a server. Which is an exact match with Kubernetes (replace server with replica). But usually your performance problem is not the executing code but the database.

PHP needs to get rid of having Nginx/FastCGI as a requirement. Let PHP-FPM speak HTTP directly. If you want to terminate TLS via Nginx, it becomes a choice, not a requirement.

FrankenPHP is this.

Seems like your beef is not with php itself (aside from the compiling part) but the Laravel ecosystem. You may want to check Symfony and its ecosystem and what is being cooked outside Laravel.

In the US.

any numbers to back this up? Laravel is very popular in EU Africa and Asia as well.

Horizontal scaling due to the nothing shared architecture

Virtually no language that can be used as web stack has any restriction on horizontal scaling? Can you name one example?

But usually your performance problem is not the executing code but the database.

the endless performance benchmarks would beg to differ. Sure, _any_ IO can and will be the bottleneck, but unless your code base is just 100 loc, you will see other bottlenecks.

FrankenPHP is this.

so why keep fastcgi? what is the advantage over http (transport, not talking about static assets)?

Seems like your beef is not with php itself

I do not have any beef with PHP or ecosystem. The complete top-half of my blog post is actually giving kudos to what makes PHP great.

My main take is simply that advantages that PHP had previously are having less impact in todays world :)

Claude writes PHP for me all the time, not dead, just deferred.

For us as well - especially for existing projects. For new projects we are failing to see the same advantages we saw just a year ago with PHP.

Yep, it's pretty amazing what you can do today with a just a little javascript and maybe a database.

Make it a compiled language with virtual machine similar to Java. The times of recursively creating PHP-files to serve PHP-files are dated (*cough Smarty). Compilation with checks and strict typing will increase the code quality fundamentally.

So...an evolution of Hack language by FaceBook / Meta? https://hacklang.org/

PHP already “compiles” with opcache. But it only happens eventually once a path is requested. Having a cli to explicitly pre-generate all compiled versions while doing checks would increase the predictability of your code. Maybe even wrap it as .phar to analogue to .jar for a simple arg when running php-fpm.

hacklang is too different. But yah, thats exactly what Facebook had to do to improve PHP within their stack.

Hack was the better language for so many reasons. It should have killed PHP instead of the other way around and I'm still annoyed about it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.