I would not start a new app in PHP
The strongest argument for PHP was never technical. It was that you could hire for it cheaply and host it anywhere. One of those two reasons has quietly stopped being true.
Contents
I rebuilt a PHP application we were running in Rust, on the same hardware, and the API now serves six to nine times the requests per second. Idle memory went from 372 MiB to 30 MiB. Startup went from 1.62 seconds to 0.22. Those are my numbers, from my own benchmarks, measured on two cores with the same data in both stacks, so weigh them accordingly. But the shape of the result was not close enough to argue about.
I wrote PHP got good and nobody told you in August, and I still mean all of it. Constructor promotion, enums, readonly, property hooks: the language genuinely improved more in six years than in the fifteen before. I spent the first nine years of my career writing PHP and I am not embarrassed about any of it.
Both of those can be true, because whether PHP is a good language was never the question that decided anything.
The real argument for PHP was economic
Think about why PHP actually won, honestly, rather than how we justified it afterwards.
You could hire PHP developers quickly, in volume, at rates that made agency work profitable. You could deploy to five-dollar shared hosting by dragging files into FTP. Every CMS your client had heard of ran on it. When a developer left, the next one could read the codebase in an afternoon.
That was a genuinely excellent set of reasons. It is why I built a career on it, and why I would have given a client the same advice in 2016 that I am arguing against now. None of it was about the language being well designed. It was about PHP being the cheapest path from a signed contract to something running in production.
The technical case was always the junior partner. We argued about syntax because the economics were settled.
Agents moved the cheap part
Here is what changed, and I do not think the implication has fully landed yet.
The expensive part of using an unfamiliar language used to be the human. Learning the syntax, the idioms, the standard library, the framework’s opinions. That cost was real, it was paid per developer, and it was why “the team knows PHP” won so many architecture discussions. It was often the correct answer.
That cost has not gone to zero, but it has fallen hard. Writing the boilerplate, remembering the signature, translating a pattern you know in one language into another: that is now the part a model does well. What is left for you is the part it does badly, which is deciding what the system should do and noticing when the answer is wrong.
So “my team knows PHP” is a much weaker tiebreaker than it was two years ago. And once that argument stops carrying the decision, you are left comparing the things the economics used to let you ignore.
What you are left comparing
Resource cost. My rewrite idles in a twelfth of the memory. On a laptop that is a curiosity. On a fleet, or on the small VPS most self-hosted software actually runs on, that is the difference between one box and four. PHP’s model of booting the world on every request is excellent for shared hosting in 2009 and expensive everywhere else, and the usual answer is to put a process manager, a queue worker, a scheduler and Redis next to it, which is four more things to run.
The security surface, argued properly. I want to be careful here, because the lazy version of this argument is wrong. PHP user code is memory safe. You will not segfault a Laravel controller, and “Rust is safer” does not mean what people often imply when they say it about a web app.
The honest version is about the surface area, and it is worse than the lazy version. Run your eye down The Wire for a month. The WordPress and PHP ecosystem produces a steady, unglamorous stream of unauthenticated RCEs, privilege escalations and SQL injections, in plugins with hundreds of thousands of installs. PHP core itself shipped an out-of-band emergency release for two critical flaws this year, which I wrote a patching runbook for. A dynamically typed language with a vast ecosystem of unaudited plugins and a C engine underneath is simply a bigger target than a compiled binary with a dependency tree you could read in an afternoon.
That is not a claim that Rust code is secure. It is a claim about how much there is to get wrong, and how much of it is code you did not write.
The counterarguments I take seriously
If this piece only listed reasons I was right, you should not trust it.
Rewrites are usually a mistake. Mine took months and it replaced something that worked. I did it because I wanted to know the answer, not because the PHP version was failing. If your app is in production and making money, this post is not telling you to touch it.
Laravel’s productivity is real and Rust has nothing like it. Eloquent, migrations, queues, Horizon, the scheduler, an ecosystem that solves the boring 80% before you start. Axum and sqlx are good, and they are not that. For a CRUD app with a deadline next month, Laravel still wins on the only axis that matters, which is whether it ships.
Hiring cuts the other way. Rust developers cost more and there are fewer of them. If the agent argument is wrong, or only half right, that bill lands on you.
Agents are better at PHP than at Rust. This is the strongest objection and it undercuts my own argument. Models are trained on what exists, and there is vastly more PHP in the world than Rust. In my experience the gap is narrowing and is smaller than the volume difference suggests, partly because the compiler catches what the model gets wrong, which is a feedback loop PHP cannot offer. But I am not going to pretend it is not there.
What I would actually pick
Not “anything but PHP”, which is not advice.
For a service with real throughput or resource constraints, Rust or Go. For a product where the team is already strong in TypeScript, TypeScript end to end, which costs you some performance and buys back a lot of velocity. For something where the heavy lifting is a scheduled job or a pipeline, Go, because the deployment story is a single binary and the learning curve is genuinely short.
What this is not
It is not that PHP is bad. I have said the opposite in print and I meant it.
It is that the one argument that reliably won the decision, that PHP developers were cheap and plentiful and anyone could pick it up, has weakened enough that it should no longer win by default. When you take it out of the equation, the remaining comparison is less flattering than the habit suggests.
So the next time you start something new, make the choice on the merits rather than on momentum. If PHP still wins after that, fine, you have a reason rather than a reflex. In my own work it has stopped winning, and the first time I measured the difference rather than assuming it, the gap was larger than I expected.