Java is more akin to the Corolla. Utterly insipid (by design), lacking in refinements compared to competitors like the Mazda3, and made for people who just see it as a way to get from point A to point B.
PHP is the Hyundai Elantra of programming. It used to be popular because of low adoption costs but was the butt of jokes for a long time because of its questionable design and poor reliability. But like the Elantra, it has come a long way and is actually decent these days.
This is very ignorant of a modern Corolla in a lot of ways.
As an example, since 2023, the standard base level Corolla has an automated suite of driving assistance technologies that blow away anything Mazda offers even at their highest level of expense.
There is only one car that passed testing for automatic emergency braking from 62mph to a dead-stop (future standard) - the Toyota Corolla.
Modern Java is quite good these days, no? Type inference, fibers, text blocks, records...
I agree if we were talking about Java 8 (and I have no doubt a lot of people are still unfortunately using that), but I wouldn't mind a modern Java setup as much as I would have in the past.
Great analogy, horrible example in the analogy heh. (Hate to nitpick)
Of the two, Mazda3 would be the "less frills, cheaper, works", especially in 2025.
I also don't recall a period of lack of trust for corolla due to design/repair ability; My great uncle always talks about his "first real, new car" being a 69 corolla that was a workhorse. That paved the way for the JP takeover by the late 80s.
Java is more like the Honda. It's literally everywhere, ultra reliable, sufficiently boring technology that people can't stand to look at it because it simply makes no statement about anything, and despite all attempts to replace it or dethrone it, it continues to excel and grow.
PHP did well for ONE reason: it was really, really, really easy to deploy. This was, of course, underestimated by programmers in the know, but I remember first getting into web dev, and I could start putting real programs (!!!) on the web, in minutes!
I would say it was more like the bicycle. Cheap, no license, even a kid could be suddenly zooming around town with no ceremony, no red tape, minimal investment.
I haven't used it in well over a decade, but still remember fondly how great it was as a gateway drug to bigger and better things.
Can't upvote this enough. Zero friction is like superconductivity: a huge, qualitative jump. If doing the key thing is trivially, absurdly easy, people will readily excuse whatever shortcomings the product may have, be it a specialist tool like Docker, or a mass-audience service like Twitter.
Yep. I was doing Perl CGI scripts at the time, and you often ran into deployment issues somewhere along the line of uploading the scripts via FTP, making them executable, and setting the permissions on any files that needed to be written. Building PHP into the web server instead of external CGI scripts eliminated a lot of that, so it was more likely to just work without some back-and-forth with a web admin to get things setup right for CGI to work. It wasn't the language, but the way it was deployed.
of all the reams of php snark the internet has produced, one line has stuck in my mind - "any fool could write php, and many did". both because it was funny, and because that lowered barrier to entry is actually a good thing. I want "any fool" to be able to program and if php supports that goal, more power to it.
It just moved the work somewhere else, generally an Apache config on a shared host. The user could very often just dump some PHP files in place and they'd be served up, but if you had to set up a new host then it was as fiddly as anything else.
This pattern also meant dropping everything the docroot, using .htaccess to hide things, having different behaviour depending on the global php.ini. All architectures had to be mashed into a request/response cycle (and anything more complex was no longer just drop the files in). It was a very long way from the idea of reproducable builds.
I agree it was popular, but not really for the right reasons.
PHP is so hard for me to describe. I used it a lot in the late 90s when we were migrating off mod_perl because it was a great way to add dynamic data to otherwise static pages, and no one really knew how to develop large sites yet. We were making it up as we went along. But ye gods, the language was bad. “A poor craftsman blames his tools” and all that, but imagine a screwdriver with 2 handles and 3 tips projecting at random angles. Sure, you could assemble an IKEA desk with it, but would you want to? And would you look suspiciously at anyone who claimed to love that weird screwdriver when the equivalent of a Snap-On was available for free from the same place they got the weirdo?
I think that’s the root of much of the horror. No one would bat an eye at using PHP to add little bits of server-side content here and there. It’s great for that! But then you see the giant castles of non-Euclidean horror built with it, and people pointing to them and saying “see what you can built with that weird screwdriver?”, and parts of the castles randomly fall off and kill their owners. No! While that’s impressive, it doesn’t exactly inspire confidence in the screwdriver, or in the people who keep using it to build things larger than it was clearly able to do well. But heaven help you if you point out that there are saner screwdrivers. “You’re just being close minded and out of touch! We added another handle to it and removed the razor blade so it’s much better now!”
Maybe so, but wow, it’s still one hell of an odd screwdriver.
As I remember it all the early languages that let you write code inline with the HTML were proprietary such as server-side Javascript built into Netscape's web server, ColdFusion, ASP, etc.
PHP was the first of these that was open source and basically competent which made it my #1 choice for making web applications in 2001. Compared to many other languages (say cgi-bin) it was pretty fast without a build step and had enough resource management that hosting firms could offer cheap PHP hosting plans which made world-changing open source products like Wordpress deployable.
It got long in the tooth quickly because people realized that to make quality web applications you had to have a part of your framework (a "router") which could serve different pages based on the inputs. For example, if you are doing server-side error handling on a form you either display a form that says "successful" or you re-display the form with error messages. You certainly can write PHP that does that if you have some discipline, but once you introduce a router you might as well write your "views" with some kind of templating system and after ruby-on-rails every language got frameworks, typically Sinatra-like, which were about as comfortable as PHP and that pushed you into having some discipline.
Its HTML-inline nature is the entire reason I ever used it. At some point in the early 2000s I came across PHP’s include, which felt like the piece of HTML that’d always been missing. Suddenly I no longer had to manually keep all that header/nav/footer code in sync across N pages! Magical.
It wasn’t until Rails rolled around that I built anything resembling a “real” web app, though. The structure and convention it brought made it much more approachable than PHP, because all the examples of more involved PHP at that point were chaos-spaghetti that was a challenge to tease apart and use as an example for learning.
The author makes a fair point that the language is no longer the fractal of bad design it was in 2009, but doesn't make the case for starting a green field project with it in 2025.
What does it do better than other languages? The article mentions features that sound like parity with other modern languages, but nothing that stands out.
This is often the fastest way to solve your immediate problem, at the cost of making everything harder to reason about. PHP persists nothing between requests, so all data that needs to persist between requests must be explicitly persisted to some specific external data store.
Non-php toolchains, of course, offer the same upsides if you hold them right. PHP is harder to hold wrong in this particular way, though, and in my experience the upside of eliminating that class of bug is shockingly large compared to how rarely I naively would have expected to see it in codebases written by experienced devs.
I think the advantages are pretty much what they always were.
1. Easy deployment - especially on shared hosting
2. Shared nothing between requests means easy concurrency AND parallelism
3. Mixing with HTML means you do not need a separate template language
Not everyone will see the third as an advantage, and many web frameworks, including PHP ones, prefer a separate, more restrictive, template language. It can be a footgun, but it is very convenient sometimes.
Honestly the author doesn't even make a great case that PHP has improved since 2009. His arguments mostly seemed to be "don't use the old busted way, there's a better way now". But if you have to go out of your way to remember to not use the old busted way, sooner or later you will shoot yourself in the foot. Having good defaults matters, and the author seems to ignore that.
I’ve used PHP for more than 20 years. It’s my “go-to” language for the backend. I’m not a server programmer, and PHP is fast, well-supported, and, if you’re a decent programmer, you can write robust, secure, performant servers in it.
I also really don’t like the language. I’ve never warmed to it.
But I think it will still be around, as a principal backend language, for the next fifty years.
I wonder where this graph gets it's data from. Scala sitting at 4.6 percent and python at 1.2 percent is not what I would expect, but my perception of the industry could be totally off.
I've also used it for about 20 years now. Surprised you haven't warmed up to it. It's perfectly fine. I still use it for scripts from time to time even though I prefer TS now because it's got some good stuff built-in.
The article loses impact due to the way the author keeps self-conciously mentioning how the "PHP haters" are wrong instead of just explaining the possible usecase for PHP better.
I've never really used it but it would have been somewhat useful to know why anyone would choose this language for a greenfield project in 2025, given the choices available. The reasons given are pretty unconvincing to me.
I fell in love with PHP in kind of a funny way (and looking at my career now, was probably an indicator I was destined for what I do now) because it saved me during college.
My 2nd to last quarter I had to cram 20 difficult units because of some requirement I had somehow missed. Part of that was a 5 unit web development project/lecture course. Our project was to build an ecommerce site. We were introduced to several paradigms of how to build end to end, PHP being one of them - and as other commenters have noted, what I particularly liked was its ease of deployment.
However, the class at the end pushed everyone towards vanilla JS, which I have never had much success working with and to be honest kind of loathed it. I could not deploy the site with it on the school servers - apparently I wasn't the only one.
So, I looked carefully at the rubric and realized only 20% of it was code evaluation. The rest was site design, and one massive chunk of the grade was simply just getting it deployed by the deadline.
So, I wrote it in php because I knew 1000% it would work and I could get it running on time. The TA wanted to fail the project, but since only 20% of the grade was code, I got a B-. Almost everyone failed because only a few people could get it deployed at all.
I'd love to work on modern PHP projects but don't know where to start or what even is out there, people just scoff at it because it looks horribly ugly and its history of security flaws.
Having always referred to Java as the Honda Civic of language-ecosystem, I take offense to this claim that PHP is the robust, cheap, and reliable workhorse.
Functional and reliable, but often maligned by Real Car People for being boring and underwhelming.
Granted, the specific directions of the criticisms aren't quite the same, but there's definitely a decent analogy in there.
I don't know much about particular models, but perhaps a better make to pick as an apt analogy for PHP would be Hyundai: formerly a brand with fairly widespread reliability issues, that cleaned them up a lot more recently, and now a very solid pick.
Yeah. I had a 1990 Corolla from its best selling car in the world period and it was functional reliable and designed with a lot of care even if it was a simple design compared to fancier stuff.
PHP is a DeLorean. I think I encountered 10 segfaults in it within 1 year which is a complete joke. This was only two years ago.
It also includes breaking changes in point releases which is a nonsensical maintenance strategy - this is in stark contrast to the reputation of stability in a Corolla.
While PHP may have some strengths, it immediately fails this particular comparison.
> I think I encountered 10 segfaults in it within 1 year which is a complete joke.
Segfaults in PHP are highly unusual. The language definitely has warts, but it's extremely well tested and usually doesn't crash in production, unless you're using unstable extensions or pre-release versions.
> It also includes breaking changes in point releases which is a nonsensical maintenance strategy
There are lots of projects out there that do not follow semver for their releases; that doesn't mean it isn't stable in itself. Having said that, every PHP release at least has proper change logs so you can safely migrate to a new version.
I will never give PHP any serious thought. Back in the mid 2000s I started an app hosting company as a side-gig. I started out hosting FogBugz (bug tracker) because Fog Creek Software only offered it as a self-hosted option. I had zero problems for 9 months - it was a Microsoft ASP based app (IIRC). Then I decided to host a helpdesk app called HelpSpot. At the time it was a one-man startup and he didn't offer a SaaS option either so he was happy to send customers my way. The software itself was fine (and it's still around) but it was a PHP-based system and no matter how up to date I kept the servers, the PHP servers got hacked over and over due to PHP's complete disregard for security at the time. My claim to fame is I hosted Twitter's first helpdesk. I got tired of getting home from work and having to rebuild servers almost weekly, so I "sold" my fledgling little sidegig for $2k. Screw PHP.
Emphatically no. PHP is the ford escort of programming (needing regular maintenance, rather insecure but easy and simple to drive and control). Unlike the Toyota Corolla which is really REALLY reliable, consistent and much much more secure.
(as someone who's maintained a lot of different vehicles for years and a lot of programming languages this doesn't even quite cut it. PHP is a lemon car).
I think the author means the Nissan Versa of programming. Corollas are quite a bit more expensive and hold value longer. But both are very useful.
I've written more shell scripts than any other language for close to a decade now. The reason is simple: I'm not writing web apps. I mostly do system programming (that is to say, tasks needed to build or maintain a system or are generally user-focused yet non-interactive). You don't need more than a shell script for most of that.
My contemporaries will, of course, pooh-pooh a shell script on general principle. If it's not using a more "advanced language" it must be unreliable or unmaintainable or ugly. Yet the practical experience of writing programs in multiple languages over years leads me to the same conclusion: literally any language will do. You could use BASIC for system programming. You could use ASM. It will work. People will argue over whether one language is "better" than another, but who cares if it's better or not? If it works it works. But that's because nearly any language works for that kind of program. Other kinds of programs need advanced features, so you need a more advanced language. But for simple tasks? It doesn't matter.
To go back to the car analogy: you can use literally any car to pick up groceries. You can't use any car to pick up 3,000lbs of sandbags.
If we were scientists and not craftspeople, none of these discussions would be relevant. We'd pick up the tool designed for our specific purpose and not bicker over our personal preferences or idealistic principles. But our languages, and our approach to using them, is anything but scientific. We're just a bunch of tradies talking shit at the water cooler.
Having used many of the 'Toyota Corollas' to build web apps, do any others feel a little pang of frustration that, here in 2025, teams have the choice of using TypeScript on both the client and the server and choose not to?
"Use this other language I know for the backend, it's the [reliable car model]. It's the {Latin, Swahili, English} of the programming world. It's JVM, it's PHP, it's Python, it's Ruby, it's C#'"
I feel that after a decade of jumping between systems, TypeScript is now the "good enough" language. We have to use it on the client. Now we can use it on the server.
The weird side-projects vibes node libraries had in the 2010's have matured into fully supported production systems in the 2020s.
And I've never been happier. It's a fine choice for the backend, and it's not really optional on the frontend. Which is important: like a lingua franca, TS/JS is not optional in a web app. This is not an attribute which PHP shares.
My main gripe with TypeScript (and node/JS) on the backend, is that it's not trivial to scale horizontally. You start node and it's a single event loop.
Most people will tell you to use pm2 to start copies of the server. Well pm2 looks like a hack cobled together. And pm2 has conflict of interest with their paid pm2 server. There's incentive to keep pm2 free version limited.
Other's will tell you to use many docker containers. Seems a bit overkill for some applications.
Why can't it have a simple, mature, built-in multi-threaded server like .NET Kestrel or Go http?
Its unclear if Typescript has comparable backend ecosystem. For JVM you can find reliable, somehow well documented, widely used library for most of backend stories: driver for that database, SOAP-XML lib with support of niche security protocols needed for integration with some finance/healthcare institution API, logging, monitoring, etc.
But you kind loose the simplicity of these other languages. Like not needing a complex build setup, the unreliable dependencies. Compare to Django, Ruby on rails and Laravel. JavaScript doesn't have anything as feature complete
The Corolla was simple but very well designed; it's manuals were used in classes teaching car mechanics.
PHP was not well designed. No one learning to program should choose it as a first language. That fact that people did choose it was because it was free, easier than Perl and cheap/easy to deploy (in the shared hosting era).
You are better off starting with a typed language like C#/Java/Kotlin (for OO-first) or OCaml/F# (for FP-first) or even Golang.
It teaches you the value of getting things done in a simple and straight forward way. I'm working with people who have grown up with Java and it shows. They tend to overcomplicate everything.
Dude, you’re totally right. Common Lisp is the Bagger 288 of programming. It's this absolute unit of a machine, designed to literally eat mountains. And when the first mine shut down, it didn’t retire or rust away. They drove it across Germany at 2 miles an hour, moving villages and flattening everything in its path. People came out just to watch it roll by like it was some kind of steel god. Eventually it got a new job at another mine, still doing work nothing else could touch.
That’s Lisp. It was made for brain-level problems before AI was cool. It didn’t disappear, it just kept doing its thing while the rest of the world stacked layer after layer of frameworks and hype. It’s not trendy. It’s not dead. It’s just too powerful for most people to even know what to do with. It won’t write your todo app, but if you’re trying to build something wild that actually thinks a little, Lisp is still sitting there, waiting.
I have programmed using Php for at least 25 years. While PHP did start off being quite poorly designed for security, newer versions of Php and also the PHP frameworks like Laravel, Yii etc have become quite sophisticated over the years and is a really good alternative to frameworks like Rails etc.
The CMS frameworks have also improved quite a bit.
The improvements in PHP include big performance gains - PHP 7 was a huge improvement over PHP 5 and now PHP 8 also includes a JIT), improvements in the language such as a type system, object orientation, improved error handling etc.
PHP 8 is a lot faster (about 3x) faster than Python.
I always found Hack interesting. It's PHP slowly transformed step by step into something closer to Java (Java isn't as bad as new grads claim, compared to PHP it's actually great). It's pretty much exclusively used at Meta.
Basically what they did is they had repeated codemods (changes to the entire codebase with automated tooling) that bit by bit moved PHP closer to Java. More and more static typing, generics, all the common Java ADTs (Vector, Map, Set, Pair, etc.), bytecode+JIT execution, etc.
Essentially instead of rewriting the codebase to a better language they just changed the language itself. Which makes sense since PHP is a much smaller codebase than the Meta backend.
I dabbled in Hack and HHVM several (almost 10 now??) years ago but haven't kept up. My understanding was that PHP8+ now includes the improvements that Hack brought, making the leap to Hack less interesting/valuable. Is that not the case?
I'm quite surprised that the article doesn't mention Laravel.
PHP as a language? Definitely getting better but still not great. Doesn't support async, the stdlib is awful, data structures are quite rudimentary (no tuple, no list, no map, just a weird array type mixing maps and lists), the old extension system sucks.
But the ecosystem? Damn. I see many people here saying that Typescript is definitely the mature choice for the backend. Honestly, I wanted to believe it, but I disagree. The level of productivity with Laravel is absolutely insane. You have everything you need out of the box and you can launch something so fast it's almost unreal.
Typescript doesn't have that. Maybe it's because of a different mentality in this ecosystem (you should build your blocks yourself), but nothing comes close. The closest would be Adonisjs but it doesn't seem to gain traction.
You don't choose a language to build your web project. You choose a stack. A framework.
I definitely prefer python but Django has way less features than Laravel and I don't really enjoy using it. Typescript on the backend was a thing I wanted to believe in (because sharing types between the front and back is a great idea), but I feel like I have to reinvent the wheel, or at least choose 20 different wheels to do something quite simple.
Is Ruby such a great language, or do people just love being productive with Rails? It seems to me that the usage of Ruby without Rails is quite low (I could be wrong).
People choose and stick with stacks, not just languages. And I couldn't find something equivalent to Laravel elsewhere. Give me an equally productive stack and I'll happily drop PHP.
My day-to-day work now is mostly Python and Vue, but PHP was my bread and butter for almost 20 years and to this day probably still probably one of my favorite languages just because I am still so familiar with it. There's something to be said for knowing all the traps and rough spots, and knowing how to avoid them.
The things that held PHP up in the early days, especially it being just dead simple to deploy, are not as big a deal in 2025 as they were in 2005. Shared hosting, while it still definitely exists, is kind of a dying model. Most modern dev I see these days even in PHP is nginx/PHP-FPM and containers, which is really not that terribly different from any other web framework. Even Wordpress, these days I recommend anyone who truly wants to go down that path to find a hosted Wordpress provider rather than trying to do it themselves.
Personally? I would never start a greenfield project now using just PHP. I don't know many people who would.
But PHP + Composer + Laravel? Laravel did for PHP what Rails did for Ruby, and what React/Vue/etc did for JS. Composer gave PHP real package management. It cannot be understated how important it was to have a framework and package manager to take care of all of the thoroughly unpleasant parts. That way you can focus on building the app, not reimplementing things you've done so many time before.
There's few programming environments I hated more viscerally than PHP. Yes, it got the job done. But thank God I never had to maintain that giant kludge of duct tape and elastic bands.
I've mentored for a lot of PHP GSoC projects. I always force the students to use PHP binaries from the late 90s or early 2000s (the sweet spot IMHO). Those versions are typically simpler in design/implementation, built to last, and-- for the relatively minor bugs you find-- there are lots and lots of workarounds you can find all over the web.
I do understand the conveniences that make people choose the latest version. But these GSoC students are typically working on projects where things like personal health data must be kept secure on public facing servers. For those cases, being able to understand the engine-- and even change it out manually, if needed-- is paramount to security.
In short, those earlier versions were designed by engineers to last. And if you know how to patch the runtime you can essentially drive them forever.
The corolla is wonderfully designed for its main purpose- a cash cow in its segment. PHP just worked, but it is not well designed. The reason it is somewhat simple to deploy is because everyone and their dog had to learn how to deploy it - compared to deploying a Go binary it is miserable.
I spent a few years trying to work on legacy PHP systems. Would never take another job using it if I had any choice. Most large tech companies do not have large PHP codebases, and most small ad hoc PHP codebases are awful to work with (in my experience), so the intersection of "uses PHP" and "higher quality software engineering" is pretty small. I won't say it's an empty set, but it's a small opportunity space. Meanwhile, the odds of having to work on really awful codebases are... high.
Generally - we live in a world with lots of fantastic programming languages, so I would never choose PHP for a greenfield project if I had a choice, and I would not pursue professional opportunities with legacy PHP codebases except in very special circumstances.
Even after years of not building anything substantial with PHP, it still maintains a soft spot in my heart. I remember how it felt writing PHP code ~15 years ago and feeling so productive. I felt that I could do anything with it. Then the Laravel framework came around and made that experience at least an order of magnitude better.
I think the main issue for PHP nowadays is the curse that it had many issues (especially security-wise) in the past and so many folks believe that the PHP of today is still the PHP of the past, when in actuality, it's evolved into a pretty dope programming language/environment with some pretty decent features. It seems like this is something that the PHP community can't shake no matter how hard they try.
What people who don't work on content sites don't realize is that from 10 best CMSes like 7 are written in PHP. And i don't even mean Wordpress. It's stuff like Craft, Kirby, Twill, October, Bolt, Statamic, Bookstack, Dokuwiki, Mediawiki… there few OK ones in Javascript but they lack features and maturity.
That's why it's so popular in those circles. If you want really solid selfhosted platform for publishing/ecommerce you can't avoid it.
For SPA web apps or anything realtime… sure there are probably better choices. But many agencies transition to making small apps with devs already knowing PHP then it's not bad choice.
The fact that people are ignoring the degree to which human factors are responsible for making the Corolla what it is in people's minds is disappointing albeit 100% predictable.
The Toyota Corolla would not be what you think it is if "Altima people" historically went out and bought them in droves and many would do well to think about comparable effects on other classes of product (Adobe Flash anyone?).
I don't think this analogy holds. Corollas are popular because they are good cars. People make individual choices to buy them and are generally satisfied with that choice long term. Corollas are not a regretful product choice.
PHP is more like a Lime scooter. Trivially easy to start with, gets going quickly, significant chance of causing brain damage.
I think the allure of javascript is the idea that you can use sparse server resources and have your software mostly run on the client side.
I’m resistant to using php, because I really don’t want to have heavy server resources, but if I were building an app that used heavy server resources anyways, I would be open to php.
That's certainly one appeal of JavaScript, but also consider that the client being a browser means you can run JavaScript on uncountable numbers of devices. And since the introduction of Node there's also the appeal of being able to write in one language for both server and client.
I think that wordpress probably had a big impact on PHP's success.
It's on 40%+ of sites. It was set up in a way for people to make modifications to actual code (or at least see). Hosting providers had to make sure PHP was preinstalled and useful.
php is so boring and it works. i am so surprised to not see more jobs on HN for it. I don't really consider myself a PHP programmer, it just, what we use I dont think about it, almost ever.
Whenever I read HN talking about PHP I am reminded of the Gell-Mann Amnesia effect. The level of discussion on the topic is abysmal, compared to (I guess perceived?) the discussion on other topics.
It's interesting how clearly 80% of the developers in the community clearly have 0 clue about modern PHP. People mention shared hosting, code in html files, CGI and bad security defaults. To be clear these things have been dead in the PHP world for 10+ years, but most developers here have used it once in 2005 and haven't seen how it looks like in the modern ecosystem.
It's as if whenever the topic was Java, the discussion would center only around the devs working with Java 1.8.
Likely, the rest of the discussion on HN is of the same level, but I have a harder time spotting the errors.
Right, I think this gets at the biggest issue with "judging languages."
We'd like 'thereotical fundamental aesthetics that strongly predict beautiful and useful programs' to be the thing to judge languages on and well, nope, never.
None of that matters until people start making stuff. And people making stuff with the language which in turn equals more people making stuff with the language is the primary metric.
linkage|6 months ago
PHP is the Hyundai Elantra of programming. It used to be popular because of low adoption costs but was the butt of jokes for a long time because of its questionable design and poor reliability. But like the Elantra, it has come a long way and is actually decent these days.
catigula|6 months ago
As an example, since 2023, the standard base level Corolla has an automated suite of driving assistance technologies that blow away anything Mazda offers even at their highest level of expense.
There is only one car that passed testing for automatic emergency braking from 62mph to a dead-stop (future standard) - the Toyota Corolla.
Freedom2|6 months ago
I agree if we were talking about Java 8 (and I have no doubt a lot of people are still unfortunately using that), but I wouldn't mind a modern Java setup as much as I would have in the past.
Reubachi|6 months ago
Of the two, Mazda3 would be the "less frills, cheaper, works", especially in 2025.
I also don't recall a period of lack of trust for corolla due to design/repair ability; My great uncle always talks about his "first real, new car" being a 69 corolla that was a workhorse. That paved the way for the JP takeover by the late 80s.
smrtinsert|6 months ago
antisthenes|6 months ago
Can you tell me which car is Python, so I can add it to my shopping list?
Grazester|6 months ago
slt2021|6 months ago
iainctduncan|6 months ago
I would say it was more like the bicycle. Cheap, no license, even a kid could be suddenly zooming around town with no ceremony, no red tape, minimal investment.
I haven't used it in well over a decade, but still remember fondly how great it was as a gateway drug to bigger and better things.
nine_k|6 months ago
(Do one thing, but do it well; sounds familiar?)
aaronbaugher|6 months ago
zem|6 months ago
dissent|6 months ago
It just moved the work somewhere else, generally an Apache config on a shared host. The user could very often just dump some PHP files in place and they'd be served up, but if you had to set up a new host then it was as fiddly as anything else.
This pattern also meant dropping everything the docroot, using .htaccess to hide things, having different behaviour depending on the global php.ini. All architectures had to be mashed into a request/response cycle (and anything more complex was no longer just drop the files in). It was a very long way from the idea of reproducable builds.
I agree it was popular, but not really for the right reasons.
0xblinq|6 months ago
Thanks God most of us didn’t have to deal with that enterprise crap for long, and in my case it was thanks to PHP too.
kstrauser|6 months ago
I think that’s the root of much of the horror. No one would bat an eye at using PHP to add little bits of server-side content here and there. It’s great for that! But then you see the giant castles of non-Euclidean horror built with it, and people pointing to them and saying “see what you can built with that weird screwdriver?”, and parts of the castles randomly fall off and kill their owners. No! While that’s impressive, it doesn’t exactly inspire confidence in the screwdriver, or in the people who keep using it to build things larger than it was clearly able to do well. But heaven help you if you point out that there are saner screwdrivers. “You’re just being close minded and out of touch! We added another handle to it and removed the razor blade so it’s much better now!”
Maybe so, but wow, it’s still one hell of an odd screwdriver.
arcanemachiner|6 months ago
PaulHoule|6 months ago
As I remember it all the early languages that let you write code inline with the HTML were proprietary such as server-side Javascript built into Netscape's web server, ColdFusion, ASP, etc.
PHP was the first of these that was open source and basically competent which made it my #1 choice for making web applications in 2001. Compared to many other languages (say cgi-bin) it was pretty fast without a build step and had enough resource management that hosting firms could offer cheap PHP hosting plans which made world-changing open source products like Wordpress deployable.
It got long in the tooth quickly because people realized that to make quality web applications you had to have a part of your framework (a "router") which could serve different pages based on the inputs. For example, if you are doing server-side error handling on a form you either display a form that says "successful" or you re-display the form with error messages. You certainly can write PHP that does that if you have some discipline, but once you introduce a router you might as well write your "views" with some kind of templating system and after ruby-on-rails every language got frameworks, typically Sinatra-like, which were about as comfortable as PHP and that pushed you into having some discipline.
cosmic_cheese|6 months ago
It wasn’t until Rails rolled around that I built anything resembling a “real” web app, though. The structure and convention it brought made it much more approachable than PHP, because all the examples of more involved PHP at that point were chaos-spaghetti that was a challenge to tease apart and use as an example for learning.
Zak|6 months ago
What does it do better than other languages? The article mentions features that sound like parity with other modern languages, but nothing that stands out.
JoshuaDavid|6 months ago
Shared nothing architecture. If you're using e.g. fastapi you can store some data in memory and that data will be available across requests, like so
This is often the fastest way to solve your immediate problem, at the cost of making everything harder to reason about. PHP persists nothing between requests, so all data that needs to persist between requests must be explicitly persisted to some specific external data store.Non-php toolchains, of course, offer the same upsides if you hold them right. PHP is harder to hold wrong in this particular way, though, and in my experience the upside of eliminating that class of bug is shockingly large compared to how rarely I naively would have expected to see it in codebases written by experienced devs.
graemep|6 months ago
1. Easy deployment - especially on shared hosting 2. Shared nothing between requests means easy concurrency AND parallelism 3. Mixing with HTML means you do not need a separate template language
Not everyone will see the third as an advantage, and many web frameworks, including PHP ones, prefer a separate, more restrictive, template language. It can be a footgun, but it is very convenient sometimes.
spdionis|6 months ago
Besides the shared nothing architecture mentioned by sibling:
- A more mature community and ecosystem for open source packages e.g. basics like following semver
- One single clear option for package management, which is also by far best in class
- Simply better performance except maybe compared to javascript
While the rest of the options may tick one of the above boxes, none of them ticks all 3.
sharpshadow|6 months ago
bigstrat2003|6 months ago
ChrisMarshallNY|6 months ago
I also really don’t like the language. I’ve never warmed to it.
But I think it will still be around, as a principal backend language, for the next fifty years.
I feel like this graph says it all: https://w3techs.com/technologies/history_overview/programmin...
I call it "The Fishtank Graph," for obvious reasons.
89vision|6 months ago
woleium|6 months ago
8n4vidtmkvmk|6 months ago
jamil7|6 months ago
I've never really used it but it would have been somewhat useful to know why anyone would choose this language for a greenfield project in 2025, given the choices available. The reasons given are pretty unconvincing to me.
woleium|6 months ago
JohnMakin|6 months ago
My 2nd to last quarter I had to cram 20 difficult units because of some requirement I had somehow missed. Part of that was a 5 unit web development project/lecture course. Our project was to build an ecommerce site. We were introduced to several paradigms of how to build end to end, PHP being one of them - and as other commenters have noted, what I particularly liked was its ease of deployment.
However, the class at the end pushed everyone towards vanilla JS, which I have never had much success working with and to be honest kind of loathed it. I could not deploy the site with it on the school servers - apparently I wasn't the only one.
So, I looked carefully at the rubric and realized only 20% of it was code evaluation. The rest was site design, and one massive chunk of the grade was simply just getting it deployed by the deadline.
So, I wrote it in php because I knew 1000% it would work and I could get it running on time. The TA wanted to fail the project, but since only 20% of the grade was code, I got a B-. Almost everyone failed because only a few people could get it deployed at all.
I'd love to work on modern PHP projects but don't know where to start or what even is out there, people just scoff at it because it looks horribly ugly and its history of security flaws.
omnimus|6 months ago
normie3000|6 months ago
antonymoose|6 months ago
danaris|6 months ago
Granted, the specific directions of the criticisms aren't quite the same, but there's definitely a decent analogy in there.
I don't know much about particular models, but perhaps a better make to pick as an apt analogy for PHP would be Hyundai: formerly a brand with fairly widespread reliability issues, that cleaned them up a lot more recently, and now a very solid pick.
tim333|6 months ago
lucasyvas|6 months ago
It also includes breaking changes in point releases which is a nonsensical maintenance strategy - this is in stark contrast to the reputation of stability in a Corolla.
While PHP may have some strengths, it immediately fails this particular comparison.
9dev|6 months ago
Segfaults in PHP are highly unusual. The language definitely has warts, but it's extremely well tested and usually doesn't crash in production, unless you're using unstable extensions or pre-release versions.
> It also includes breaking changes in point releases which is a nonsensical maintenance strategy
There are lots of projects out there that do not follow semver for their releases; that doesn't mean it isn't stable in itself. Having said that, every PHP release at least has proper change logs so you can safely migrate to a new version.
GiorgioG|6 months ago
teunispeters|6 months ago
(as someone who's maintained a lot of different vehicles for years and a lot of programming languages this doesn't even quite cut it. PHP is a lemon car).
0xbadcafebee|6 months ago
I've written more shell scripts than any other language for close to a decade now. The reason is simple: I'm not writing web apps. I mostly do system programming (that is to say, tasks needed to build or maintain a system or are generally user-focused yet non-interactive). You don't need more than a shell script for most of that.
My contemporaries will, of course, pooh-pooh a shell script on general principle. If it's not using a more "advanced language" it must be unreliable or unmaintainable or ugly. Yet the practical experience of writing programs in multiple languages over years leads me to the same conclusion: literally any language will do. You could use BASIC for system programming. You could use ASM. It will work. People will argue over whether one language is "better" than another, but who cares if it's better or not? If it works it works. But that's because nearly any language works for that kind of program. Other kinds of programs need advanced features, so you need a more advanced language. But for simple tasks? It doesn't matter.
To go back to the car analogy: you can use literally any car to pick up groceries. You can't use any car to pick up 3,000lbs of sandbags.
If we were scientists and not craftspeople, none of these discussions would be relevant. We'd pick up the tool designed for our specific purpose and not bicker over our personal preferences or idealistic principles. But our languages, and our approach to using them, is anything but scientific. We're just a bunch of tradies talking shit at the water cooler.
kevdoran|6 months ago
"Use this other language I know for the backend, it's the [reliable car model]. It's the {Latin, Swahili, English} of the programming world. It's JVM, it's PHP, it's Python, it's Ruby, it's C#'"
I feel that after a decade of jumping between systems, TypeScript is now the "good enough" language. We have to use it on the client. Now we can use it on the server.
The weird side-projects vibes node libraries had in the 2010's have matured into fully supported production systems in the 2020s.
And I've never been happier. It's a fine choice for the backend, and it's not really optional on the frontend. Which is important: like a lingua franca, TS/JS is not optional in a web app. This is not an attribute which PHP shares.
stathibus|6 months ago
hu3|6 months ago
Most people will tell you to use pm2 to start copies of the server. Well pm2 looks like a hack cobled together. And pm2 has conflict of interest with their paid pm2 server. There's incentive to keep pm2 free version limited.
Other's will tell you to use many docker containers. Seems a bit overkill for some applications.
Why can't it have a simple, mature, built-in multi-threaded server like .NET Kestrel or Go http?
riku_iki|6 months ago
kelvinjps10|6 months ago
cies|6 months ago
PHP was not well designed. No one learning to program should choose it as a first language. That fact that people did choose it was because it was free, easier than Perl and cheap/easy to deploy (in the shared hosting era).
You are better off starting with a typed language like C#/Java/Kotlin (for OO-first) or OCaml/F# (for FP-first) or even Golang.
PHP sets you back if chosen as a first language.
zeroc8|6 months ago
DonHopkins|6 months ago
https://www.youtube.com/watch?v=azEvfD4C6ow
https://en.wikipedia.org/wiki/Bagger_288
fragmede|6 months ago
That’s Lisp. It was made for brain-level problems before AI was cool. It didn’t disappear, it just kept doing its thing while the rest of the world stacked layer after layer of frameworks and hype. It’s not trendy. It’s not dead. It’s just too powerful for most people to even know what to do with. It won’t write your todo app, but if you’re trying to build something wild that actually thinks a little, Lisp is still sitting there, waiting.
pkphilip|6 months ago
The CMS frameworks have also improved quite a bit.
The improvements in PHP include big performance gains - PHP 7 was a huge improvement over PHP 5 and now PHP 8 also includes a JIT), improvements in the language such as a type system, object orientation, improved error handling etc.
PHP 8 is a lot faster (about 3x) faster than Python.
https://sailingbyte.com/blog/php5-to-php8-modern-programming...
AnotherGoodName|6 months ago
Basically what they did is they had repeated codemods (changes to the entire codebase with automated tooling) that bit by bit moved PHP closer to Java. More and more static typing, generics, all the common Java ADTs (Vector, Map, Set, Pair, etc.), bytecode+JIT execution, etc.
Essentially instead of rewriting the codebase to a better language they just changed the language itself. Which makes sense since PHP is a much smaller codebase than the Meta backend.
benburleson|6 months ago
Einenlum|6 months ago
PHP as a language? Definitely getting better but still not great. Doesn't support async, the stdlib is awful, data structures are quite rudimentary (no tuple, no list, no map, just a weird array type mixing maps and lists), the old extension system sucks.
But the ecosystem? Damn. I see many people here saying that Typescript is definitely the mature choice for the backend. Honestly, I wanted to believe it, but I disagree. The level of productivity with Laravel is absolutely insane. You have everything you need out of the box and you can launch something so fast it's almost unreal.
Typescript doesn't have that. Maybe it's because of a different mentality in this ecosystem (you should build your blocks yourself), but nothing comes close. The closest would be Adonisjs but it doesn't seem to gain traction.
You don't choose a language to build your web project. You choose a stack. A framework. I definitely prefer python but Django has way less features than Laravel and I don't really enjoy using it. Typescript on the backend was a thing I wanted to believe in (because sharing types between the front and back is a great idea), but I feel like I have to reinvent the wheel, or at least choose 20 different wheels to do something quite simple.
Is Ruby such a great language, or do people just love being productive with Rails? It seems to me that the usage of Ruby without Rails is quite low (I could be wrong).
People choose and stick with stacks, not just languages. And I couldn't find something equivalent to Laravel elsewhere. Give me an equally productive stack and I'll happily drop PHP.
RebeccaTheDev|6 months ago
The things that held PHP up in the early days, especially it being just dead simple to deploy, are not as big a deal in 2025 as they were in 2005. Shared hosting, while it still definitely exists, is kind of a dying model. Most modern dev I see these days even in PHP is nginx/PHP-FPM and containers, which is really not that terribly different from any other web framework. Even Wordpress, these days I recommend anyone who truly wants to go down that path to find a hosted Wordpress provider rather than trying to do it themselves.
Personally? I would never start a greenfield project now using just PHP. I don't know many people who would.
But PHP + Composer + Laravel? Laravel did for PHP what Rails did for Ruby, and what React/Vue/etc did for JS. Composer gave PHP real package management. It cannot be understated how important it was to have a framework and package manager to take care of all of the thoroughly unpleasant parts. That way you can focus on building the app, not reimplementing things you've done so many time before.
PeterStuer|6 months ago
fsckboy|6 months ago
https://www.youtube.com/watch?v=iNMrQUF6Fvc
jancsika|6 months ago
I've mentored for a lot of PHP GSoC projects. I always force the students to use PHP binaries from the late 90s or early 2000s (the sweet spot IMHO). Those versions are typically simpler in design/implementation, built to last, and-- for the relatively minor bugs you find-- there are lots and lots of workarounds you can find all over the web.
I do understand the conveniences that make people choose the latest version. But these GSoC students are typically working on projects where things like personal health data must be kept secure on public facing servers. For those cases, being able to understand the engine-- and even change it out manually, if needed-- is paramount to security.
In short, those earlier versions were designed by engineers to last. And if you know how to patch the runtime you can essentially drive them forever.
And... scene. :)
paulryanrogers|6 months ago
What is the significance of 'scene'?
eptcyka|6 months ago
decasia|6 months ago
Generally - we live in a world with lots of fantastic programming languages, so I would never choose PHP for a greenfield project if I had a choice, and I would not pursue professional opportunities with legacy PHP codebases except in very special circumstances.
jay-barronville|6 months ago
I think the main issue for PHP nowadays is the curse that it had many issues (especially security-wise) in the past and so many folks believe that the PHP of today is still the PHP of the past, when in actuality, it's evolved into a pretty dope programming language/environment with some pretty decent features. It seems like this is something that the PHP community can't shake no matter how hard they try.
omnimus|6 months ago
That's why it's so popular in those circles. If you want really solid selfhosted platform for publishing/ecommerce you can't avoid it.
For SPA web apps or anything realtime… sure there are probably better choices. But many agencies transition to making small apps with devs already knowing PHP then it's not bad choice.
msgodel|6 months ago
PHP is boring and poorly designed. Maybe more like some of the very old Eastern European cars.
rs186|6 months ago
librasteve|6 months ago
https://rakujourney.wordpress.com/2024/09/15/can-raku-replac...
If you are wondering, Raku can replace PHP literally…
BUT that’s beside the point. Just my sense of -Ofun getting out of hand.potato3732842|6 months ago
The Toyota Corolla would not be what you think it is if "Altima people" historically went out and bought them in droves and many would do well to think about comparable effects on other classes of product (Adobe Flash anyone?).
munificent|6 months ago
PHP is more like a Lime scooter. Trivially easy to start with, gets going quickly, significant chance of causing brain damage.
pinewurst|6 months ago
t1234s|6 months ago
daft_pink|6 months ago
I’m resistant to using php, because I really don’t want to have heavy server resources, but if I were building an app that used heavy server resources anyways, I would be open to php.
threetonesun|6 months ago
interestica|6 months ago
billy99k|6 months ago
I've not been out of work for my entire 20 year career and there were always lots of jobs around.
Many other people I know that used other languages struggled a lot more over the years.
petersumskas|6 months ago
wodenokoto|6 months ago
calvinmorrison|6 months ago
spdionis|6 months ago
It's interesting how clearly 80% of the developers in the community clearly have 0 clue about modern PHP. People mention shared hosting, code in html files, CGI and bad security defaults. To be clear these things have been dead in the PHP world for 10+ years, but most developers here have used it once in 2005 and haven't seen how it looks like in the modern ecosystem.
It's as if whenever the topic was Java, the discussion would center only around the devs working with Java 1.8.
Likely, the rest of the discussion on HN is of the same level, but I have a harder time spotting the errors.
rwaksmunski|6 months ago
theanonymousone|6 months ago
erichocean|6 months ago
timbit42|6 months ago
haunter|6 months ago
volkadav|6 months ago
jrm4|6 months ago
We'd like 'thereotical fundamental aesthetics that strongly predict beautiful and useful programs' to be the thing to judge languages on and well, nope, never.
None of that matters until people start making stuff. And people making stuff with the language which in turn equals more people making stuff with the language is the primary metric.
debarshri|6 months ago
DonHopkins|6 months ago
mmcromp|6 months ago
e: (my only real experience with java is spring boot)
briffid|6 months ago
baggachipz|6 months ago
timw4mail|6 months ago
MarkusQ|6 months ago
madduci|6 months ago
[deleted]
yboris|6 months ago
https://frankenphp.dev/
voidUpdate|6 months ago
sam_lowry_|6 months ago