Hacker News new | past | comments | ask | show | jobs | submit login
Usage statistics of server-side programming languages for websites (w3techs.com)
209 points by TicklishTiger 11 days ago | hide | past | favorite | 271 comments

I think this shows how much HN is a bubble in itself.

Most discussions here happen around new/exciting/cool/weird technology. And don't get me wrong, I love those discussions! That's why I come here!

But reality outside of this bubble is people building and maintaining web apps as efficiently as possible and PHP hasn't stopped being very efficient. On the contrary, it's getting better with time.

Interestingly enough, Ruby (my personal interest, here) has been steadily gaining share in that chart year over year, despite not being "cool" anymore.

If you ask me, it's good to have a dose a reality from time to time!

It is not about efficiency , it is about legacy. You can count number of Perl scripts out there and conclude that Perl is still the most popular scripting/devops tool in the world

In PHP's case it's about WordPress which still being deployed at a very high rate. While the blogging thing isn't that much in focus anymore, WordPress + Divi + WooCommerce is an extremely common stack for setting up eCommerce sites.

An yes, then there's Drupal, Laravel, Symfony, and many others, and they're going strong too. Heck, even Joomla is actively developed even though it's probably small enough today to be considered legacy.

cPanel could probably included, it's nearly on all web hosts.

cPanel is Perl, not PHP.

Yes, majority of websites (legacy on PHP 5.6 and modern site in PHP 7+) use CPanel. Even thought that cPanel is written in Perl.

Most newbie coders would start out coding their own blogs in PHP/Nodejs or Python on shared hosting, some web host use web framework as well.

Probably true. Another thing I’ve missed are all those admin and status pages for iot and networking equipment

And facebook...

Facebook has done impressive things with PHP, but they are one single entity. WordPress is an entire ecosystem with millions of users, and while Facebook changing their underlying stuff wouldn't be noticed by most, I can assure you there would be a large amount of people who noticed if WordPress decided to switch to ASP.NET or something.

Kind of true, there are loads of companies that started out as a 1 or 2 person gig with a crappy wordpress site as their MVP, then they take on a full time php developer to make some changes and before you know it they are a few years in and are rebuilding their site in Laravel or Symfony.

Literally my story right now.

Haha yes! I did Symfony/Laravel contracting for years and all the companies I worked for started like this.

I worked on a bunch of projects where PHP was still used for landing/home page and absolutely nothing else

>>You can count number of Perl scripts out there and conclude that Perl is still the most popular scripting/devops tool in the world

Perl is still heavily used. I wrote more than 2K lines just last week, lots of it is throwaway. But hey not many languages make it easy for you to write thousands of lines of throwaway code in hours.

It's still the most useful language in the backend/unix world. This comes from me, who actually writes lots of Python code. But I wouldn't use Python where I use Perl. It would just make me slow and it wouldn't get the job done just as well as Perl.

It's not used as frequently for web dev, or other places where Java is used. But it's very good at what it does. Glue language for the Unix world.

> Perl is still heavily used. I wrote more than 2K lines just last week, lots of it is throwaway.

Agreed. For any one-off (or occasional) task that in any way involves juggling text (which in Unix CLI world is nearly all of it), perl is still the fastest way to get done.

Back in '92 (roughly when I started using perl), its regex support was revolutionary. Today, all languages have decent string handling and regex support. And yet, none is quite so naturally well integrated as in perl. So here 30 years later, if I need to pick apart and recombine text, give me perl.

would you consider those 2k perl loc legacy/maintenance work or something new?

Why would it be called legacy, I wrote that just last week. This is active development.

Besides merely being an old technology doesn't mean legacy. SQL is fairly old.

I wrote a bunch of scala code last week to fix problems in a service that we are actively working to replace. I consider this a "legacy" work, nothing to do with technology used

It's clear that legacy has a pretty strong influence, here, with Wordpress and other standard tools inflating PHP's numbers and Shopify doing the same for Ruby.

But, I'm pretty sure there's plenty of new projects being started nowadays in PHP, Ruby, Java, etc, because they're the most effective tool for the job.

It's just that this is not news. News is yet-another-standard-tool-written-in-rust.

Not always true. Is also about the best tool for the job.

Ex. I had to implement a task that would need to check if an image is similar to other image (not related to porn/csam). I implemented it with just a few line of PHP and no 100+ package dependencies. How? I run a linux CLI app from inside PHP, super easy.

but, but , you can do it with node too, - yes, but guess int he past in a node project, soem dev instead of calling ffmpeg directly he npm installed some shit package that called ffmpeg. The package was basic and it did not include or options needed , some other dev would have installed other package to get a new ffmpeg feature, /

I removed all those packages and done it directly.

My point is that we need to use the best tool for the job, if there is a CLI app or Java program/library that solves your problem a developer should present teh client the truth "I can solve your problem using this in 1 day or I can rewrite it in CoolLang and CollFramework and CoolPacakgeManager and CoolTranspilter with 100+ shit dependencies in 1 month. I am afraid many developers are choosing the last option to pad their CV and pump their ego.

I would say is also the ecosystem, PHP has a bit ecosystem and it can always use all the Linux applications (once in a project I integrated PHP with node program puppeteer) so there is no limitation, I miss more features in JS then I miss them in PHP.

Or, maybe developers who choose other languages are also competent professionals who make language/framework choices for good reasons. I have no considered opinion about PHP but one reason I have never used it for a web application backend is because I do a lot of coding that PHP is not well-suited for (high-performance, data intensive) and it is easier to write the web server in the same language I use for everything else.

Also, in general passing untrusted input to shell commands is probably a bad idea. FFmpeg has had many CVEs over the years and taking an upload from a user and piping it to a CLI command is asking for trouble. There are considerations beyond just doing the easiest thing that could possibly work.

>Also, in general passing untrusted input to shell commands is probably a bad idea.

This is why you escape the shell command arguments, but if you blindly npm install a shitty wrapper you probably hit the issue with security issues. Sure review of the dependency would be great but I did not seen many devs doing it, if they would have reviewed the ffmpeg wrapper would have noticed the simplicity and implemented themselves and on top of that learned some new stuff.

>Or, maybe developers who choose other languages are also competent professionals

I did not say that all of node developers are beginners, I am saying that many developers are not using the right tool for the job but use the cool tool for the job and some developers just blindly npm install shit because this is the only thing they know.

And I can confess I was guilty of this, on a project I propose to use Qt4 over Adobe Air because I was fan Qt and hated Adobe , turned out in the end I was forced to use Adobe Air and I loved it, for what we were doing it was the best tool for the job.

HN is a super bubble, it's a great bubble because it's a bubble I am part of, but it's almost extreme sometimes how much of a bubble it is. Really any topic of PHP, security, Apple, privacy etc showcase the bubble.

I am sure the stats are somewhat off due to what others said about it being harder to detect Python, etc. But it's probably not that far off, this community greatly overestimates the usage of more "developer friendly" language combinations like Python+Django, etc.

What people really want is a solid CMS or off the shelf product they can tailor to their needs and since pretty much everyone of the most popular CMSs (Drupal, WordPress, Magento, PrestaShop) is PHP based this is no surprise.

That leaves a small portion of asp.net CMSs (Kentico, Umbraco, episerver, dotnetnuke, etc) and a bunch of hosted solutions (Wix, SquareSpace, etc).

I like your description. Mine is that HN is not so much a bubble, but an enclave of highly opiniated feuding camps that just can't stop themselves from having shouting matches with eachother.

It's a controversial opinion of mine, but many other languages have come and gone since PHP, yet it still dominates. With all the new alternatives nothing has taken over and it shows that stability and mature works better than change when there is not a critical need for it.

Modern languages have also time and time again forsaken the ideal of making development LESS COMPLICATED than prior languages, and this is why they don't take over markets. Creating more abstract languages just to do the same things that PHP, Python, Java, JS, and other "legacy" langs have accomplished (over many years) does not make sense. Too many people get credit for reinventing the wheel these days and it's a distraction from truly game-changing innovation.

Relevant and reliable function resides in a separate lane than innovative new solutions. They shouldn't be hyped and rushed to market as "PHP killers" simply because they generate buzz and new contract money.

And FTR... If you still have to compile code in 2021 prior to running it, you're burning a lot of extra valuable time off your life and away from your family in frustration just to find out that the advice on Stack Overflow was not relevant to your framework's new update, and you'll regret the lost years on your death bed... probably... Sorry, That had to be said... :P

Code compilation has saved me so many headaches that would have otherwise been discovered in production, so I can't say I agree with you there. That said the languages I compile also take 15 seconds so I don't experience that 40 minute compilation times some people have and that would probably sour my experience a bit. The language I'm talking about is Elixir fwiw.

A nice machine can build an entire web engine in 40 minutes. A modestly large C codebase still compiles in seconds.

Wait a minute... You guys don't test in PROD?

LOL... j/k. :P

Architecture design and Agile now compensate for the traditional compile/test procedures... DEV > STAGE > PROD

When it's practiced with discipline it works well, catching most issues prior to the system going down anyway on deployments to PROD :)

> Wait a minute... You guys don't test in PROD?

Of course I do. No other environment is identical to prod, real data, real users, real scale.

All depends on the nature of your app of course... But I've managed to do pretty accurate simulations with modern tools in Stage environments, and to regularly sync my STAGE and PROD environments on high traffic sites with safer test results... Different strokes I guess.

When else would you have time for sword fighting if not for compiling?


...showing my age with this comment

> If you still have to compile code in 2021 prior to running it, you're burning a lot of extra valuable time off your life

I almost never run my code. If it compiles I know it's correct.

Really? I hope not. Just because it compiles, doesn't mean it won't panic because of some weird state caused by a race condition buried deep in the code where a lock wasn't held when it was so desperately needed

Looking at his username, its very very likely sarcasm.

I guess I don't fit in, here.

I write native Apple software (Swift/UI/App/WatchKit), and my server stuff is PHP (and works great).

I like to spend as little time as possible on the backend. I totally admit its not my strong suit, so having a robust, highly-supported, standardized, performative, language like PHP, with a gazillion assistive resources and examples around, is nice. I've been writing stuff in PHP for over 20 years, so I sort of know my way around it.

I'll be expanding my Apple native stuff into the new "pseudo-reactive" realm of SwiftUI, but I don't really plan to keep growing my backend chops. PHP is doing fine for me. If I need anything else, I'll hire the talent.

Agreed, PHP works great for APIs and the server setup/config is extremely simple with both Apache and Nginx

Yeah, but who knows how many of those are “ghost ships” that were built for local businesses over 5-10 years ago, were never touched since, never got security updates, and now load slowly because there’s a bitcoin miner churning away in a subprocess because they got hacked 2 years ago.

To make a slightly problematic, somewhat poor taste analogy: 50% of the worlds houses (not a real stat, I’m lazy) have sheet metal roofs. All of the following are likely true:

- sheet metal roofs are wayyyy better than nothing for keeping the rain out. If you can’t afford anything else, definitely use them.

- Most people with sheet metal roofs would probably prefer something else, and would choose something else if the option was on the table.

- The prevalence of sheet metal roofs as a roofing material says less about sheet metal’s awesomeness as a roof than it does about factors that have little to do with sheet metal roofs (like global inequality).

- If you talk to construction workers in developed countries, they’d grant you that sheet metal roofing is quite prevalent worldwide, but they’re more interested in other materials and techniques that provide real substantial benefits.

Metal roofs last much longer than asphalt shingle roofs and are considered to be a superior material despite being a “legacy” roof. Asphalt shingle roofs dominate in the US simply due to cost and more roofers being familiar with the material.

How much of this is just the millions of Wordpress or Nextcloud installations? I’d be more interested in knowing how many unique apps or developers work on each language because in my experience I haven’t actually seen a single php developer other than Wordpress tweakers.

There are a lot of WordPress sites. The same site reporting the metrics on PHP also points out that WordPress is 42.5% of all sites [1].

That being said, I know a fair number of PHP developers. None of them are in SV or Seattle. They are in cities many have not heard of. They're all over. Some do public sites. Some do company internal web apps.

Take a project like Symfony, a PHP framework. It's popular but not the most popular. Now, take a look at the download stats for its packages [2]. They are large.

There is software development happening all over the world. A bunch of it is in PHP.

[1] https://w3techs.com/technologies/details/cm-wordpress

[2] https://packagist.org/?query=symfony

> That being said, I know a fair number of PHP developers. None of them are in SV or Seattle. > There is software development happening all over the world.

I think this is probably the biggest part of the HN bubble: the idea that "tech hubs" like Silicon Valley make up all, or a supermajority, of tech workers.

I've never even visited the west coast, never lived in a town larger than about 20k people, and frankly never really want to live in a city. Yet I work in tech, and have my entire adult life. (At this point, I am, in fact, primarily a PHP programmer.)

And I'm hardly an exception.

Nearly every company over a handful of employees needs tech support, programming, a website, even servers managed. Many of these will hire internally. Others will turn to contractors—who are also locals.

Silicon Valley, with its high concentration of tech workers and ludicrous salaries, is very much the exception here, and a lot of HNers would do well to remember that, lest they end up looking as out of touch with the real world as Lucille Bluth asking about the price of a banana. [0]

[0] https://media1.giphy.com/media/yJu2jIQZgPubm/giphy.gif

I live in NY, but am not part of the NY "tech scene," because I find they are not particularly welcoming to me. I won’t go where I’m not wanted.

Not really a big deal. I'm pretty cutting edge, on the frontend (native apps for Apple systems, in Swift), but a bit stodgier on the backend (I use PHP). I’m not surprised at all by the survey results.

PHP works great for me. If I need something different (not an issue, so far), I'll hire it in. I'm actually fairly good at big projects in PHP. My code is maintainable and high-quality. It may not be “leet” PHP, but it works well.

Here’s an article about this kind of thing, that is a bit “meta”: https://veekaybee.github.io/2019/05/10/java8/

There are plenty of custom PHP websites and devs that write them. I, too, still write fully custom (no framework) PHP webapps for customers where I don't expect to be babysitting the app after it's written, and where websockets and real-time interactivity is not necessary.

PHP is great fit for that, because all dependencies are part of the system updates in that case.

Yes - I wrote a messageboard in PHP 18 years ago whilst clutching an OReilly book in my hand. It's definitely not well coded, but it works. It's moved servers many times, changed OS, Webserver - and it's now running on my NAS. I've maybe twice had to spend an afternoon tightening it up due to some PHP change - but broadly been maintenance/issue free.

For at least the last decade I've been pondering re-implementing it in some fancy new language - but as it just keeps working, it slides down the priority list.

That's the "secret" of PHP. It's 20 years later and it just works. Many other front-end development tools and frameworks have come and gone in that timeframe yet PHP persists. Why? Well, I'm not a PHP expert but it sounds like they care about backwards compatibility. You don't have to continually reimplement everything all the time, which both costs money and discourages further investment. There are reasons COBOL is still around 50+ years later.

"because in my experience I haven’t actually seen a single php developer "

With all due respect, that is one hell of a bubble :). Plenty of companies use PHP (not just WordPress) and there are plenty of PHP devs who work with core, symfony, Laravel etc.

PHP is battle tested and even though it has its quirks, you can never go wrong with it if you are looking to build a web application.

P.S: We are hiring web developers for our company and PHP experience is preferred considering our stack.

I worked almost 10 years doing PHP. Only corporate apps (backoffices/frontoffices/services/batches, monitoring CO2 for train transports, GPS , invoices, train orders, electronic consignment notes ,sso&subscriber management for a magazine, bridges... ), not a single WordPress. So at some point there were PHP developers and I met many. I lost interest in PHP when the industry moved to REST APIs and SPA though.

Facebook (PHP/HHVM), Slack, Wikipedia, Esty are quite large with a ton of PHP devs. None of them are wordpress tweakers. PHP devs are out there! (Me!)

I do PHP and haven't touched Wordpress for years. Laravel and Symfony are great projects for building web apps with.

> because in my experience I haven’t actually seen a single php developer other than Wordpress tweakers.

I think your experience is probably limited then. Or you're not looking for them. ??

Nice to meet you.

You've never seen a PHP developer?

Hey! I also love PHP and Ruby. I was a fan of Rails until I discovered Laravel and I found it to be similar but better (and much faster). People who bash PHP should take a look at PHP 7/8 and what clean and professional PHP code can look like.

I suspect these reports also have a good 5-10 years lag time from when a language gets popular, early adopters start using & creating libs, and then finally actual companies start adopting it. From that point there's a lull of development to get the site up, and then a couple of years later everything finally blossoms and the technology shows up on this chart.

"Ruby (my personal interest, here) has been steadily gaining share in that chart year over year, despite not being "cool" anymore."

I have a comment from yesterday that is (rightly) sitting at -4 (https://news.ycombinator.com/item?id=28501661) that seems relevant: The rise of Ruby on that chart can be directly correlated with the rise of Shopify.

Elsewhere they note that Shopify "accounts" for 3.9% of the top million websites. The bulk of Ruby's increase.

Though I'm suspicious of the accuracy of their numbers. Most modern tech stacks don't announce themselves in the way that PHP did, and they clearly used curated metadata to attribute some major content engines (e.g. Shopify = Ruby, Wordpress = PHP, Wikis = PHP, etc), which means that anything outside of the top identifiable content engines isn't going to have proper attribution.

Further, note that literally any use gets credited. Look at the "popular sites using Shopify" at -


Overwhelmingly they get the shopify/ruby credit for linking to a minimal checkout experience on a subdomain. That seems...incredibly dubious.

Still neat though. But what it really demonstrates is that product wins, not technology. Wordpress is clearly a winning product. Shopify is a winning product.

I tell people all the time about how good the Ruby job market is. Lots of opportunities and not a ton of people to fill them for some reason.

People from other languages don’t seem to want to believe it.

I'm not sure if the Ruby market has ever been better from the pov of devs looking to get hired. There's now a ton of companies with established revenue streams based on Ruby/Rails apps looking to hire, while simultaneously it seems like all the new grads have bought the "Rails is dying!" hype and are looking to invest their time in other techs. Also it seems like all the bootcamp types have moved on from Rails to JS which has only further dried up the incoming developer pipeline.

It doesn't help that despite the impressiveness of the 15 minute blog demo, Rails has always been somewhat difficult to get up and running, particularly on Windows, and it seems like that has only grown worse over time.

It looks like US adopted Ruby but in EU it never really catched the attention. EU is is still full of PHP.

I don't think a lot of new companies are based on Ruby anymore seeing on how there's hardly any talk of Ruby anymore. But that's just an observation.

The Ruby dev market in Europe is hotter than ever.

Of course, that's in relative terms. It's nowhere near the size of the Java, JS or even Python market size, but demand is strongest than ever and salaries show that, too

In a sense that is also an indication that it might be dying.

What's interesting is that PHP and Ruby are not just popular, they're increasing.

I am curious about that Scala number though. 2% of 10 million is quite a lot: 200,000 Scala websites? I would have never guessed!

I wonder if it's due to the Play Framework which could be used in either Scala or Java.

In India most of the startups are using Java (springboot) and typescript.

I am actually finiding it difficult to get good paying jobs in Ruby and thinking of moving to Typescript.

Back in 2016 I quit my job as a QA tester to pivot back into my intended career as a software developer. (I had studied CS but got roped into QA as my first job out of school). I sat down and tried to build multiple rails sites as practice. I kept seeing all these Rails positions in the NYC area. I learned a few hard lessons after spending almost two years unemployed and running out my savings:

1. Yes there are lots of Rails jobs but they wanted senior or at least mid level people who learned the deep nitty gritty of Rails at other companies. Few companies were willing to hire you as entry level to work on the job. The few entry level jobs had an ocean of candidates from the bootcamps.

2. I hated looking at Ruby code. Coming from a Java/C# background in college, it just make no sense to me and was ugly. I learned that while there are a billion guides on how to build basic Rails apps, there is very little on doing more complex things. A lot of that knowledge is just spending the time in a job learning a lot of things you can't learn in a book.

Now that I have internalized MVC architecture much better now I have considered going back to Rails to learn what I couldn't comprehend back then but every time I think about it I think about all the horrible nights I was sitting in my basement depressed that I was forcing myself to learn this crap and getting nowhere.

3. I should have dropped it much sooner. Instead I dragged myself in misery day in and day out and entered a deep depression trying to get some position....anything in Ruby/Rails.

4. I even resorted to unsavory tactics such as super fuzzing my resume just to get my foot in the door and ultimately bomb final interviews when asked about the inner working of libraries such as ActiveSupport among others. (Like seriously? Did I have to read all the C source of Ruby to get some basic job?). This fuzzed resume got me in a position where I was getting a 90%+ callback rate and the majority of them led to the final technical interview where I would end up not knowing some Rubyism or having difficulty solving a Ruby question in their existing codebase. Many rejections were due to the fact that while I solved the problem, I didn't solve it in the "Ruby" way. I guess Java/C#/C ruined my brain. I am not worthy of Matz's greatness.

Eventually through sheer dumb luck I managed to get a Angular2+/Flask position at a super large oldschool company only due to my nice manager knowing nothing about the tech stack so he took a chance on me. I thank god for this opportunity as I was maxing out my credit cards trying to survive. This low stress position allowed me to fall in love with Angular and Python and I have never looked back on the horror that is Ruby/Rails.

Thinking about my experience now(and this is subjecting to my experience interviewing at dozens of NYC companies), I noticed Rails being used at all these silly hipster startups that mostly produce garbage anyway. I remember interviewing for this "art studio" that was producing a revolutionary camera system in partnership with an Italian company. The company was just one giant room with round tables where Rails people would be making the web backend that connected with their camera system. They produced the product and got rid of their Rails people a year later. That seems to be the nature of the ecosystem. I saw so much of that in the Rails community.

6. This experience taught me that the community of the language will evidently affect your day to day life and overall career prospects. The niche nature of Rails allowed people who got in super early to make massive mounts of money (hence all the Senior Rails job ads promoting 200K in NYC) but you are mostly stuck working for these "cutting edge" hipster companies and if you don't or want to fit that scene then you are SOL. Likewise Angular and Python attracted some startups as well as enterprise companies due to Microsoft's backing and its excellent library ecosystem for enterprise applications. The community is quite nice and has opened my eyes to what it is capable of. You can find startups using it or relax in an enterprise shop. Was a world of difference from Ruby/Rails.

Sometimes I shed a tear for losing almost two years of my life to this. But the reality is that I made many poor decisions from my college days up until I got this Angular job.

Agreed, in fact modern SPA stacks are incredibly inefficient.

And the corporate world move slowly.

And dev cost money. Most websites don't need more, they were fine 10 years ago and still are.

Although I'm not sure we have the whole story. I'm assuming we get high stats because of wordpress, which is not a good indicator of language popularity, but rather of platform popularity.

It could very well be that PHP is easier to distribute, and gets used in lots of groupware/industry-standard software that's deployed thousands of times across thousands of organizations. I'd imagine that kind of market share piles up after a while.

This is exactly it. Lower friction wins. You can just upload PHP scripts and go, while almost everything else requires many more installation steps or even monstrosities like Kubernetes.

Modern PHP application development doesn't really use the "deploy PHP scripts to a folder" model any more.

The more likely scenario is that a framework with a front controller is used, which is invoked by php-fpm, proxied by nginx.

It's easy enough to do, though.

The bulk of what I do is still, essentially, 'deploy to a folder'. There's some build steps, and a symlink swap from old to new, but that's still what it's doing. And I can still go edit a single file in a folder some place if I need to test/debug something. That's rare, but there are times when production is the only place an issue shows up (or... the only place you can replicate it - usually you can figure out enough from that to replicate locally later).

While very interesting nevertheless, just because other people are deploying WordPress websites, doesn't necessarily mean you should too.

I'm also quite happy to see Ruby continuing to grow in this report.

How much HN is a bubble in itself.

When interviewing developers, I always ask about their experience in handling sites large enough to comprise a farm, not just a single server. In all my years of searching, I've only ever come across one developer with such experience.

But here on HN, it makes it look like the multiple load balanced web and app servers we've got across multiple tiers, not to mention Docker and k8s, are on the small side.

There's definitely a big difference between those conversing here and "the unwashed masses".

I'm tempted to go even further and guess the truth is that even many of todays actual cloud deployments could probably have been better served by two to 7 beefy servers - or even a couple of virtul servers in many cases.

Well don't forget the biases that are encoded in these percentages (I'm presuming these stats are not normalized by throughput, or revenue). A ton of these websites are basically "some small-time coding contractor is contracted to build a site for X commerce business that "needs a website"" (think: the pizzeria down the corner, or the dry cleaners). If there's even any interactivity at all, it needs to be cookie-cutter. Probably there are small firms and individuals that are responsible for hundreds of these, and some medium sized firms that are responsible for thousands. Copy, paste, customize, check off with contractee, publish.

It might be 'bias', but if it was as easy to do this in other stacks, wouldn't we see hundreds of thousands of cookie-cutter/copy/paste sites in, say, .net? Or rails? Or node? That this is 'easy' with a PHP base speaks to the fact that many other stacks seemingly ignore the needs of many markets.

I seem to recall a perl CMS - was is movable type? - that required mod_perl. This certainly gave it a perf boost against other CMS, but the overhead in setting up and maintaining a mod_perl system, and dealing with making code updates, was huge compared to PHP. I think these qualities continually get overlooked, decades on.

But also consider that most of these projects are cost centers. Hn very much biases for people who are using tech as revenue (or at least core-value, in the case of not-necessairly-for-profit projects) props. It's understandable that the communities and tools should be orthogonal.

While everyone else was saying learn Node, PHP is dead, and all that stuff on here - I ran the other way and learned PHP.

No regrets because the last few years, never has an ecosystem been so bright.

Laravel on PHP 8, especially with a few add-ons like Tailwind, Tailwind UI, and Livewire (for SPA-like stuff) is so efficient with so little code it's hardly funny.

I'm convinced if you are a typical medium-sized business trying to recreate that technology with Node, Express, React, and a billion NPM packages, your are doing things the unnecessarily hard way.

HN mostly has people making web applications. These statistics are about web sites. There is a bit of a blurry line between the two, but you for the most part don't hire a software developer to make a web site.

PHP has a huge market share in web sites, but much less in web apps.

PHP started in ~1995, became a thing in what, 2003 with WordPress? Wait 8 years, some tech discussed today may hit the charts)

> despite not being "cool" anymore.

Take a look at the YC job board. A surprising number of the companies use RoR.

Indeed! That's one of the things I like to review in those "Who's hiring" posts. That's why I'm happy to continue being a Ruby developer!

For me, the ease in deployment/setup is pushing me back to CGI-ish setups for server-side apps.

> I think this shows how much HN is a bubble in itself.

The worst aspect of it is how unaware HN is of its biases.

PHP is the original serverless. LAMP. FTP. PUT index.php. Done.

I'm surprised to see ColdFusion on this list.

what do you mean by "efficient"? Developer productivity or server performance?

In my case, I was referring to developer productivity. In my experience, this is, by far, the most important limiting factor in any software project

starting a WordPress doesn't count as building and maintaining a website

HN is a place for people building sartups, I doubt that the share of PHP usage in people building Saas startup is much

As an ex PHP developer, I don’t think it will ever go away. There is just way to much software that was written in PHP (e-commerce, blogs, CMS systems, Nextcloud/ownCloud, …) that isn’t going away.

PHP isn’t something I ever want to touch again (its libs are wonky and I dislike the syntax choices of the last years) but the execution model was sort of nice before the frameworks (an entry point with a clean state you can work yourself through).

The statistics are a bit misleading though. Just because 80% of the sites run PHP in some way doesn’t mean there are that many Jobs. A lot of the work with PHP world is not necessarily going to be PHP work (a lot of HTML, JavaScript and Plugin configuration) and there is complexity in learning your way around a system well enough to build plugins. The jump from beginner to expert has become harder for a new PHP programmer because the real programming is hidden behind a wall of already existing code that just needs to be installed, configured and customized.

I’m glad I got out when I did because I get to actually program APIs and Single Page Apps rather than just being a glorified PHP webpage mechanic.

Owncloud is switching to Go. https://owncloud.com/news/ready-steady-go/

How much has the NextCloud source diverged from OwnCloud? Will it also be switching to Go?

Nextcloud won’t change to the new, go ownCloud codebase. There are two separate and competing companies behind each product now. Nextcloud also has client side encryption as a commercial add-on, that sort of is a big deal.

Why would PHP want to go away? It's developing and there's plenty of software being written in it now and it will continue to do so.

There's not much wrong with modern PHP. Symfony and Laravel projects are a joy to work with. The standards and tooling is there too with composer, phpunit, PSR-4.

I don't think you've ever been into PHP if you was only wrenching in old projects.

Dude I am old. When I was working with PHP I had to watch out for diffs between 4.x and 5.x servers. Hell, I think we hat some old 3.x code even. Frameworks where new, composer didn’t exist and I was getting annoyed of getting Paamayim Nekudotayim as an Error because the where limitations in the engine when it comes to finding the static methods of a class instance.

Thing is those OLD projects where new when I was working on them. When I got into WordPress back then It was NEW. When I got in to jQuery it had 3% market share and it was the underdog. A lot of the arguments you might be sick of hearing about, well back then they where valid.

I was using MooTools before jQuery ever was a thing but you don't hear me complaining about PHP. I love PHP and enjoy working on it each and every day.

It's legacy is a hell I agree but quite irrelevant and getting old.

You can love and enjoy PHP as much as you want, that is ok. I don’t, I’m gone and I wont be back and that should be ok too. It is not meant as a personal attack. Hell, I have a lot of bad stuff to say about JavaScript too and right now I’m writing 100% JavaScript in the frontend and the backend!

You know the saying “There are two types of programming languages, the ones you love and the ones you use”. That sort of thing. AND it still doesn’t invalidate my points:

1) PHP is relevant because of the software already written in it and that will not just get rewritten because PHP isn’t HOT anymore.

2) If you are a new PHP developer you are most likely going to be shoved into a job that has more to do with configuring, maintaining and customizing those preexisting systems.

3) Because of that getting from being a beginner PHP dev to an expert PHP dev is going to be harder than it should be.

4) There are going to be less PHP jobs in proportion to its usage out there because so many of the PHP jobs fall into the configuring, maintaining and customizing schema in comparison to other languages.

I am old also, and I have maintained some PHP code for about 18+ years now. From PHP 4 to PHP 7.4.

The changes and improvements are dramatic and wonderful. Improvements in speed, security, error processing, functionality/integration with databases, Composer, etc...

While I am not suggesting you go back to PHP, but things are simply not the same anymore.

I know it is not the same anymore. It doesn’t invalidate my experience from back then and the reason I left the community. And to get a response along the line that, I don’t get to have an opinion because the stuff I worked on was “OLD SHIT” is insulting.

It sounds like you may be taking this personally, that is not my intent.

I think you should realize that when someone expresses an experience people often times read it as warning.

And your experience sharing (as a warning to others) is not useful to the current state. And therefore could be considered damaging to other people's perspective without a counter "experience" being shared.

I have my experience and the fact that it aligns perfectly with yours up until you stopped using PHP should be appreciated for what it is.

The reason for that though is that it has changed so much that your old experience is hardly relevant because it is so different now. The Old PHP world and the New PHP world are hardly recognizable as the same thing.

1) Would you argue that point with WordPress too? It still looks a lot like the old PHP and it is a big part of those nearly 80% market share.

2) Part of my point was PHP, regardless of what you may think of it, is not bad enough that any of that code needs a rewrite. Still PHP people concentrate on me not liking PHP and argue with me about that and nothing else. Why is the reflex in the PHP community to do this so strong?

I would keep WordPress and PHP entirely separate in my mind. WordPress is... blegh. PHP and Laravel is a totally different story.

As for the reflex... PHP has had this bad reputation for so long, that most PHP programmers (IMHO, just an opinion!) feel looked down-on for using what is actually a pretty decent system now. Viewed as inferior programmers for preferring it.

WordPress sucks ass. It's a cancer and it's growing.

But you can use modern PHP in your own theme or plugin if you want.

Good point on jobs vs existing code base. It’s kind of like radio still has a lot of listeners but the amount of new stations isn’t rising as dramatically as other mediums.

PHP is a great fit for most web projects. It is battle tested with great backwards compatibility, fast, offers the best deployment story and combines the advantages of dynamic and static typing with it's gradual typing system (Think Typescript without the complexity of Typescript.)

The next version is even going to improve on its weakest point, concurrency, with Fibers: https://php.watch/versions/8.1/fibers

Sure we all remember the bad old times and the horrible legacy projects that are still around but let's no forget PHP allowed the average Joe to hack up his own dynamic websites without jumping any hurdles. It helped democratize the internet for a while.

I really don't get why PHP is not more liked in hacker circles. Probably needs some new languages with slightly different syntax that transpiles to it for it to be hip again.

I use PHP more for "shell" scripts then I do for web stuff nowadays, I find its just faster to bang out something somewhat complicated in it then other langs I know currently.

Yes! PHP is great for this. I often use it for things that people might use Python for, too, except on the web.

> Probably needs some new languages with slightly different syntax

I used to toy around with Haxe: https://haxe.org/

The idea in principle is great (use Haxe the language on your machine, then Haxe the compiler to produce PHP code and upload it to a cheap hosting somewhere), but I've never found a real use for it.

I am regularly stumbling upon Haxe. It seems like a well designed language but like you I never yet found a use case.

Though it seems to be also great for game dev. The show case of games written in Haxe is quite impressive:


I think it's close enough to ActionScript that those with flash game dev experience can be comfortable.

I think that was even the main point! If I'm not mistaken, OpenFL[1] is an effort by the same people.

[1]: https://www.openfl.org/

> It is battle tested

The security track record of the language speaks for itself: https://www.cvedetails.com/product/128/PHP-PHP.html

It's been battle tested and lost many battles.

> "I really don't get why PHP is not more liked in hacker circles"

To me PHP is an ugly language, with heaps of quirks and weird api's. The way it mixes markup and logic is gross.

That being said, I do like some parts of it. The way you compose pages by just writing "include" is nice. The way the server spins up processes for every request like a micro-service is nice.

PHP does have an elegant simplicity that many languages and frameworks lack these days...

Mixing markup and logic is strictly not done in the more modern frameworks like Laravel and Symfony, they use MVC similar to Rails.

Wordpress does mix the two, but Wordpress is definitely not a good example for modern PHP development!

> To me PHP is an ugly language, with heaps of quirks and weird api's. The way it mixes markup and logic is gross.

Kind of tangential, but I've found a similar thing in the React framework: After all these years working towards splitting UI with logic, React asks me to hardcode the graphical components in a return (<module1></module1><module2></module2>) function. It is something I just cannot grok. I prefer frameworks that let you separate the UI elements from the logic that drives them.

> The way it mixes markup and logic is gross.

We don't do that any more. You separate logic and view like in any other language.

In fact some people don't even use PHP for templating anymore but a domain specific language. (Though sometimes having a fully features programming language for templating can be nice so jury is still out.)

Honestly I am more grossed out with the stuff that some modern frontend frameworks are doing these days, where there is not separation of styling, markup and logic anymore with that thing that is like html but not totally html. I see the advantages but not sure how this will turn out in the long run.

> but let's no forget PHP allowed the average Joe to hack up his own dynamic websites without jumping any hurdles

One of the great things about PHP is that that is still ever-present. It's fairly easy to get started utilizing PHP, just as it was 15 years ago. The basics of PHP have not gotten much more complicated over time.

Open a text file, write out a bit of PHP, save it, run it somewhere (locally or on a cheap host). Any Joe can still do it. I can't think of much that has gotten more difficult about getting started with PHP versus the first time I used it.

I wonder how much the results of this are skewed because PHP reports via the server response header that it is being used. Other languages like Elixir, Go, etc aren't so public about their usage unless one of their web frameworks adds it.

I'd also love to see a study like this instead focused on "How much of the active web is wordpress?" and "How much of the inactive web is wordpress?".

Still, you can use it to gauge PHP to non-PHP. And there is an unknown percentage of PHP sites which turn this header off.

Your second sentence is why the first is unreliable: in particular, advertising server software and versions will get you flagged by most security auditors so the PHP sites which don't advertise will often be the largest and/or most interesting — for example, neither Etsy nor Wikipedia advertise that header.

Still, if you change "78%" to "at least 78%", it's impressive nonetheless.

Do you think that's “at least 78% of all sites” or “at least 78% of sites which advertise what they're built with”? The latter case seems more likely and that will distort the numbers massively.

When I heard that question several years ago in the sense why haven't Java/C# replaced PHP the answer was simple: nearly every web host offered a pre-configured web stack with PHP, MYSQL, etc. and setting up anything else was neither cheap nor easy . Seems to be nearly the same today, the first few dozen hosting providers I can find on Google either have WordPress or a one click WordPress install.

The report looks at multiple variables, not only response headers, to figure out backend language.

Can you provide a source with information on what those variables are exactly?

It's a very common config change these days to turn off expose_php (stop reporting by X-Powered-By header that PHP is installed on the server). You'll see this suggestion across nearly all forums related to PHP. That has been true for a decade or more at this point.

It's not just PHP, turning off X-Powered-By (or similar) is part of any server hardening standard for any language I've ever seen (and implemented).

I'm curious how this changes if you remove PHP being used for WordPress (where the people using it probably didn't choose it). Do lots of companies still choose PHP for brand new projects? I know Facebook has a dialect they still use, but you don't hear much about it anymore.

Yep. My employer is a mix of PHP and JS.

PHP 8 for our API, JS for the app that consumes it - sharing code both server-side and client-side.

It works really well for us.

Development on a modern version of PHP with a framework like Symfony or Laravel is so very different to development on old PHP5 versions.

edit: PHP 7.x and 8 let you do things like:

- no automatic type conversions

- typed function parameters and return types

- typed object properties

- named parameters

All of these are little niceties but they add up to making it fantastically easier to avoid stupid mistakes that used to be common with PHP.

I'd argue that the first three are not all that little ;)

PHP is my bread and butter. Yes there are still shops that use it. It doesn't really deserve the bad rap.

As a Java dev I feel you. PHP, Java are both languages that used to be god-awful, but they have evolved massively in the past decade and most of the criticism is outdated.

The bad rap was probably due to older versions. I used to program PHP in a professional setting (quite a while ago) and it basically interchangeable as any other system script (bash) executed by a parent http server process.

The language itself at the time was mostly useful because you could execute a script made of HTML (or anything really) with some embedded magic tags interpreted as PHP instead of the opposite where you had to do some sort of template engine.

Older versions were worse but the current versions still have a lot of cultural baggage around the idea that ignoring errors is great and that's it's helpful to automagically convert data types. Changing that would break a huge amount of code and habit so the community is kind of slow-walking in that direction by deprecating features, adding opt-in config, and using linters to identify likely sources of problems.

I don't disagree that it was useful — especially for having such a simple “upload a file, hit refresh” workflow — but popularity can work against you when it encourages optimizing for easy starts over long-term maintainability and a huge number of people learned dubious habits and aren't quick to switch.

It's bearable since version 7, and unless they make it another Java in version 8 which will make it unbearable again, it's gonna be ok.

Kids who want to seem cool have moved on to Go and NodeJS, so PHP is mainly left with people who got some experience and mostly know what they are doing, save for those who really just twiddle Wordpress until it sort of appears to do what they want it to do.

I suspect that PHP's ultimate fate is to become another Perl — a quite mature platform with very few people tending to it, obscure, with a community of very expensive veteran programmers.

PHP 8 has been out since November. It adds some typing but everything is optional. PHP has always been a loosely typed language. Converting to a strongly typed language would against the grain of the entire culture and history of PHP.

https://www.php.net/supported-versions.php https://www.php.net/releases/8.0/en.php

The funny part is we still use Node for various sub tasks like webpack. Soon we'll be adding a unit testing layer to the JavaScript which will run in NodeJS as well. But I might wrap it with our PHP launcher. We'll see.

The thing with PHP is it's very easy to understand in comparison with Perl. When Facebook did a study on which languages take the least amount of time to onboard new hires PHP won every time. It's also why they use their own version of PHP in house (Hack). It's 95% same thing with additional features like async built into their engine.

According to the Stack Overflow Developer Survey it's the 11th most used technology, between C and C++ [1]. It's no Java or NodeJS, but it's still widely used.

1: https://insights.stackoverflow.com/survey/2021#technology

Tons of companies still use PHP even for new projects. Likely in part due to its market saturation - it's incredibly easy to find PHP developers.

Only developers complain about PHP. And even that isn't really warranted anymore as PHP has grown leaps & bounds since most of the hate.

It's incredibly hard to find good PHP developers.

I just inherited a PHP project that it's a nightmare. It doesn't make any sense. It works on PHP 7.3 but the quality is worse than the old PHP 4 stuff.

It is so easy to write good PHP code nowadays but most devs don't do it. They just go for the old ways, with spaghetti code, no clear architecture, etc, because it just works. They don't have to think, just type. Thats why people hate the language. They see the bad code and they think the language is poorly designed.

> It's incredibly hard to find good PHP developers.

But... is it much easier to find good devs in any other tech stack? I don't see it, personally. My ruby friends complain it's hard to find ruby devs at all, and harder to find good ones. I do see a lot of JS/node folks that get accepted as 'good', but when the rubber hits the road, the code is often still... meh - cut corners, SO copy/paste, etc.

I see bad node and bad js and bad python... but somehow the languages and stacks get a pass and "it was just a bad developer". But if you see bad PHP, people think "the whole language sucks". Completely inconsistent.

You don't see as much bad python code as you see bad PHP code. PHP has no entry barrier. You can just start typing and things start working.

Compare that with deploying a hello word website in python, java or elixir.

I don't see much python code period, in my day to day work, but what I do see often... doesn't seem demonstrably 'better' by any metrics than run of the mill code from any other stack. But it sometimes comes with some sense of smugness about being 'pythonic'. Standard Java I don't get that sense, but do from some Kotlin advocates I know (usually the ones that are new to programming in general who feel they've found some new magic bullet that will overturn all the bad PHP out there).

These days if you're not using PSR4 configured auto loading with all your code in the src or tests directory and a separate public folder then you're not really qualified to work on PHP at a professional level.

I highly encourage using this template for all new projects


I just had my worst PHP dev experience in 5 years of coding. Literally. I just had to leave the office. I'm on my way home and still feel fatigued.

The project not only doesn't use composer (well, it does now because I needed some components) but it has the same third party components duplicated or triplicated around the application. It looks like they downloaded them Everytime they needed them. Some of them are modified to make them work on newer versions of PHP. And the views and the logic are mixed together in big 4k lines files with no functions. Html, js, PHP, tens of SQL queries on loops, all mixed together.

It's so bad it looks that it was made like this on purpose.

The funny thing is a pretty important project for a pretty important and unique customer.

Classic. Absolutely fabulous when this happens.

Just want to nuke everything to oblivion.

But there is hope, sometimes it can be better to inherit badly written repetitive & copy-pasted code, rather than badly written abstractions.

Badly written abstractions can be really hard to get out of years later because it tends to be viral all over the project, however when there are no abstractions at all, you can decide them right now, you are in charge. Bit by bit you can unwind this mess to something grander, to your own creation. Good luck. Praying the PHP prayer for you.

There's no unwinding. Boss says it should be done like this just to finish tasks quickly.

For the last couple weeks I've been thinking I should look for a new jobs as it looks there's no future here.

I've actually fixed this sort of situation at multiple different companies. Typically I end up getting buy in from management once I have started cause it saves money in the long run.

You start by setting up the standard router for all URLs when the php file doesn't exist. You then setup your router to answer somefile.php or whatever file you want. You then have that route execute your own class. You simply delete the original file and it now loads from your router. You can typically copy/paste the code from the file into a function in a class without any modifications. As you go you can get rid of includes / requires all over the place because now you've got auto loader configured so you can just call code from other files at will.

So then I just repeat this process. Sometimes it takes years but I can typically make a huge dent in most systems in the first few months.

If I don't get buy in I do it anyway for any code I'm asked to work on cause it makes the work better and there's no reason not to do it at that point.

I actually kind of envy you. I enjoy refactoring projects like that. You can typically bring that 4k line file you mentioned down to just a few classes and views.

Yes, for all the warts of the language, the worst thing about PHP is the illegible code that gets written by someone who glued together a bunch of solutions they found on StackOverflow. The good news is, in my experience, most of those people have moved on to JavaScript.

Note that I enjoy both PHP and JavaScript immensely. But, my God, some of the code that I've seen in both languages...

Yep, only companies that are seeking VC funds have to use "cool" technology to wow investors.

OTOH many bootstrapped or legacy companies pick long established technology to build their products as they are only selling product implementation, not the idea of changing the world or whatnot.

It might also be the client simply wants php. They don't want to pay to maintain anything extremely over-engineered.

Yeah they do, PHP has a few frameworks like Laravel (inspired by Django iirc) that can be used to work on organized web projects. The nice thing is, you know you can host it online for pennies when you're all done. One of my web hosts has a $8 a year plan for example.

The last few server-side languages I've used don't use extensions or publish a header banner. In many cases it's just not possible to tell what's running.

w3techs admit as much in their disclaimer. The data and conclusions from it are junk.

> In order to obtain any information from websites, we rely on the websites themselves, their owners or their webmasters to provide such information. Some websites are more open to sharing this type of information than others. Some technologies may provide more means to reveal information about their usage than others.

I'm a recent grad and my job is working with PHP. I had always heard and told jokes about PHP being old and washed up (my favorite what that it stands for "Pre Historic Programming"). Then I started using PHP. Some quirks I didn't like at first, and some I still don't love, but it really is a solid language. Funniest part is that I'm using 5.6 (we're working on migrating to 8). I'm so excited to get some of the more modern features too. It really is a solid language for web programming.

If I were to work on a large scale web project on my own though, I'd probably still choose JS, Python, or Go, but PHP is a language that's won my respect.

PHP has quite a few things going for it. File-system based routing before it was cool. Each request cycle is isolated, so an error in your script won't bring down the whole server. With shared hosting, you get something very similar to serverless functions today. The language was created with embedding tags from the start, so there is no need to build or use 3rd party template parser. Everything outside of php tags just gets outputted as strings, very similar to JSX. The biggest downside is (was?) C-style file includes, instead of packages.

I'd love to see this with wordpress filtered out. I think most small businesses and personal sites run PHP simply because that's what wordpress uses. Subtract wordpress from the php statistics and you get a real picture of "who's using what" without the skewed "I'm using php because I installed wordpress and I know nothing about building websites". This isn't to say people who know how to build sites don't use wordpress either, I'm simply stating that it would be more accurate to measure sites that aren't wordpress to see what languages are being used by companies on the interwebs.

Seems like a possibly good business strategy for w3techs.

They publish numbers that are very surprising to most people, like Python and JS are used on 1.5% of sites vs PHP on 79%, then offer some very handwavy text about the data ("In order to obtain any information from websites, we rely on the websites themselves"), and then offer a full report for $$$ where they probably more fully own up to how they come up with this clearly flawed data.

In the end the paying customer sees the shortcomings of the data, feels relieved that their assumptions weren't invalidated and has invested some money to doing due diligence.

I have to point out the obvious, that this chart doesn't pass the smell test and must have done something really wrong to conclude that in 2021, JS and Python power less websites than Scala.

Offish-topic: PHP docs are awesome.

Agreed, having user contributions of example code underneath is often really helpful and something I miss when looking up other languages

I'm skeptical about the methodology here.

The Stack Overflow Developer Survey [0] is my go-to source for this kind of thing, and it has very different results. Of course, it's measuring overall popularity while W3Techs is looking at "server side programming languages for websites."

Here's how the ranks compare:

  Language     W3Techs     Stack Overflow
  PHP          1           11
  ASP.NET      2           8 (C#)
  Ruby         3           17
  Java         4           5
  Scala        5           26
  JavaScript   6           1
  static files 7           2 (HTML/CSS)
  Python       8           3
  Cold Fusion  9           N/A
  Perl         10          27
  Erlang       11          35
  Miva Script  12          N/A

[0] https://insights.stackoverflow.com/survey/2021?_ga=2.2362093...

There is nothing really wrong with the methodology, it just that you have to understand what they are measuring and what the definition of a website is.




They are not measuring cron jobs, mobile apps, services, games, etc, all large sectors within the field of programming.

If we combine this survey with the Stack Overflow survey we can conclude that websites are built with PHP in the backend and with JavaScript in the frontend, nothing really chocking.

One problem with the Stack Overflow survey is that I'm not sure that the community of more esoteric languages like Erlang even uses Stack Overflow, I guess that is why it is at place 11 for W3Techs and 35 for Stack Overflow.

Rephrased: 78.9% of sites that expose implementation details of their backend run PHP.

Or claim to.

How did Ruby increase that much lately?

Also, I'm surprised Python isn't more popular. 1% is (comparatively) tiny for a language that popular.

I bet most Python web frameworks (just checked with Django) don't report being Python (or even the said framework) in HTTP headers, so it can't be counted.

Another point of data could be: https://insights.stackoverflow.com/trends?tags=php%2Cpython%...

The ruby eco system is growing and majoring every day. It's just not cool anymore :)

Python deployment continues to be a pain. And it's primary domain is more in the data science/engineering side of things.

Also, in my experience, web devs tend to hate python as much as they do PHP. I've worked at two places so far where python wasn't allowed to be used in web services at all without a Very Good Reason. Choices were Node or Go.

How would you tell a given page was generated by some Python or Ruby webframework? There aren't any headers these use (like PHP usually does), so you'd have to look for more subtle cues like the name of session cookies or perhaps patterns in the way static files are addressed.

The same goes for pretty much everything on that list which isn't PHP or .NET.

Yes, that's a good point. The "[...] of all the websites whose server-side programming language we know" clause changes the interpretation dramatically.

It swings that way for PHP as well. Several large PHP frameworks don't report PHP in the literal sense in the response headers.

Python's web dev cake was eaten by Node and React JS.

The next big thing there is Typescript.

Not sure I said Typescript is the next big thing. It's a thing now.

Discourse sites ?

Maybe, or Jekyll, Github pages etc etc...

Not sure how representative this is of people actually writing code.

I run a bunch of websites doing various little things. One is a Wordpress blog. I wanted a blog-like site so that myself and a few non-technical friends could write and publish articles on a particular subject. The easiest and most reliable and well-supported solution was to just install Wordpress. Throw in a few plugins from the Wordpress repo for any functionality it doesn't already have.

I don't understand PHP particular well, and don't feel very inclined to learn it. But hey, I don't need to, Wordpress already works fine, and there's probably already a plugin to do anything I might reasonably want to code up.

I find some of the security practices disturbing - it seems to be standard practice for the web process to have full write access to all the code files and the database. If anyone ever compromises the server code, guess they have full access to pretty much everything. But whatever, it's a standalone server with nothing but the blog. I have an Ansible playbook for the setup, so I can kill it and spin up a new one if it ever breaks.

So there you go, I'm responsible for a PHP site without writing any PHP. Probably lists like this represent a lot more low-skill deployments of existing proven codebases than bespoke projects.

There's probably something going on about ease of deployment too. I much prefer writing Ruby/Rails apps, but I don't actually know of any existing ones that I'd say are easy to do a low-skill deployment of in the way that PHP is. The nice part about things that are terrible from a security standpoint like the web process doing all upgrades and plugin installs is that it makes it much easier for less-technical people to deploy and manage it. Or people who are high-skill, but don't feel like applying all their skills towards a task that already has a straightforward solution.

I'd say it's definitely not representative of people writing code: what "code you run" on your website doesn't mean it was you who wrote that code.

There are other statistics around the web for language use.

I use php for pretty much everything. Php has a lot going for it, there are tonnes of developers who knows the ecosystem. It works on every OS/plattform there is. The performance is decent. Any systadmin out there knows how to admin an php application. The tooling is mature and you are not bound to any specific editor or ide.

For me its the perfect language.

This is interesting from a 30,000 foot view, but without knowing the details on the companies and how they are using the language it is hard to draw conclusions.

For example:

- As many pointed out, are the majority of PHP just default Wordpress sites? I would rather know who built in a given language rather than installed a site that happens to use a language. - I use to be in the banking world and it as all Java (or C++ for algo trading, Scala for data processing, but never NodeJS), but I haven't seen many new startups using Java unless the founders came from banking. The industry made a difference. - How old is the company - a 30+ old company might have Perl.

Also, a bit surprised at Javascript, AKA NodeJs. I thought it would be higher.

The people who start their company with wordpress aren't programmers. They are entrepreneurs looking to build a website for close to $0.

It's only later when they grow they hire a developer and by that point they may be committed to PHP due to the sunk costs.

A search of my country’s main job site says approx:

250 Ruby ads

420 PHP ads

1600 Java ads

1600 python ads

1300 .NET ads

This is likely more accurate than the OP link. My experience is that Ruby jobs are less common but that they seem to pay far more.

This is why I recommend converting from Ruby to PHP. Costs are way lower and it's easier to find devs.

Sure, and rewriting everything is easy and a piece of cake too

I've been in a situation before where a company was being quoted 20k for one new system build out by an outside agency to work on their ruby site. They wanted an events page with an admin back end. Instead I hired a Junior PHP dev for them making 75/year who converted the entire existing site in 8 weeks and then proceeded to build the same events functionality for a fraction of the cost and then went onto building the wish list of features they wanted over the next year. If they went with the outside agency they'd have spent 300k and probably not even had a good outcome. This was 10 years ago though so inflate everything I said across the board by 25%.

New job postings is a good metric for new web sites, but new sites are a tiny fraction of the total internet.

Existing companies still need to hire, and the job market is a good reflection of what technologies are in-demand at any given moment.

I've also heard that you can use computers for other things than displaying web sites, but that might just be a rumor :)

A search, right now, on Upwork does the following:

PHP - 12316 jobs

Ruby - 1175 jobs

Java - 5902 jobs

Python - 10051 jobs

.NET - 2353 jobs

Adding a few of the others:

C# - 2562 jobs (I suspect those .NET also can be interchanged with C#)

C++ - 1711 jobs

Go - 3925 jobs

Rust - 382 jobs

Feel free to double check my results. Like it or not, Upwork is the largest freelancer site.

Upwork also skews towards one-off gigs for businesses serving a tiny audience, often with <=$100 pay. The average full-time, long-term job offering could be equivalent to maybe 50 average Upwork jobs (just a ballpark number I pulled out of nowhere).

And let's assume your pulled from nowhere ballpark number would be true. Even then the percentage of those jobs would still be in favor for PHP, with PHP being an order of magnitude higher than Ruby

Well to counter your anecdotal search Linkedin shows 31226 jobs for Ruby (U.S) vs 22208 for PHP. I think PHP isn't really strong in North American but more in Europe.

Anecdotal search? How so, please explain.

You're searching in one website which is intended for freelancers, that's not exactly a good representation of the software industry.

I know that. What I meant is how is "anecdotal" my search. That is skewed towards freelancing, that's true, but anecdotal? It implies is a joking of a search, which is definitely not. Your LinkedIn search is skewed towards US, but I don't call it anecdotal!

I don’t even know what market share / usage statistics means here. The FAQ doesn’t seem to answer the question and the actual report is behind an order form. So: how is it calculated? Is google.com weighted the same as mom-and-pop-restaurant-near-you.com? If not, how are they weighted respectively? Of course there’s also the problem of identifying the language without an x-powered-by or similar signal, which several other commenters pointed out.

These two pages provides some more information on the subject.



Thanks. The technologies page talks about selection, mainly: (1) either Alexa top 10 million or Tranco top 1 million; (2) only apex domains are counted. It doesn't talk about weighting at all, so coupled with the subdomain policy, a reasonable assumption is that the statistics are not weighted at all.

The disclaimer page also makes it clear that they don't analyze anything that requires interactions like signing in. Together with the subdomain policy, I suspect for any business where the landing/marketing site and the core business offering differ in technologies used (which is especially common for SaaS products), they will only pick up the marketing site. They also seem to allude to some sort of webmaster self-reporting mechanism though, not really sure what that means.

Yes, it is important to understand the term "website" in this context.

The survey does not measure deployed server languages.

Methodology has at least two major flaws.

1- They say they only consider what the root of a domain is using, ignoring subdomains. Speaking for my own org our real work happens in subdomains running Django apps. Our www is just a WordPress site because we don't want to spend cycles writing/maintaining a simple blog engine.

2- For a lot of sites using e.g. Django there wouldn't be an automatic way of determining what language was used.

I think this is most indicative of the frameworks used to power the majority of the sites on the web, rather than the language chosen to power a custom application, and that is an important distinction for our audience.

Luckily for the majority sites on the Internet a CMS is exactly what's needed, and very often with more minimalistic custom development (plugins will take care of most of your needs). Thus with WordPress/Magento/Drupal being the heavyweights it's not at all surprising to see the statistics as laid out.

What I would love to see is a similar chart focused on bespoke applications, more like the kinds we would consider building for solutions, startups, and companies here in the HN space. I would guess it would probably hew closer to the stats in the TIOBE Index [0], but again one would want to filter specifically for web application development. Now those are some stats that would be very interesting!

[0] https://www.tiobe.com/tiobe-index/

This is probably correct and a lot of software still uses PHP. Wordpress being one of the huge ones. I actually see a lot of people still developing in PHP, though my own involvement finished years ago. I think because we sometimes operate in a bubble, it's always a surprise to see this

this comment section is deluded. its like they live in a bubble.

tons of companies use php, my company uses it even for modern development.

get out of your own bubble dude

It's not about living in a bubble : Python being at barely 1% means that there's very probably a problem in data gathering.

Another survey : https://insights.stackoverflow.com/survey/2021#web-framework... Puts the first PHP web framework not even in the top 10 of uses, behind framework in JS, Python, C#, Java.

How is this data even gathered ? And what is usage ? Do 1000 Wordpress count as 1000 servers ?

We should distinguish between applications developed in PHP, from installations of apps which happen to be developed in PHP.

I suspect one would see the former drop off a cliff, whilst the latter will always be quite high -- due to first-mover effects.

Some ecosystems go extinct but others stabilize for long periods and might surge again under the right conditions. Python was around for decades before it became a good fit for data science / machine learning and interest in the language exploded.

Php seems to be in such a stable phase, fixing old issues, modernizing and powering real apps used everywhere. Wordpress is being mentioned, but don't forget that wikipedia / mediawiki is also php and what those folks are doing with wikidata is ground breaking.

There are plenty of scenarios in which php could grow again, e.g widespread decentralization using nextcloud, wikidata or similar.

Modern PHP is good.. I really enjoyed working with laravel, however when you're young and want to continue further in your career.. it's rarely used in big tech companies. I moved away from it since I join enterprise company. Still missed it, but anyway big companies tend to use python, java, c#, c++.

I missed php, but I don't hate python or c#. In fact I like them both as well. Also because they're all turing complete, basically we can create anything with it.

Side note: not sure what do they mean by websites, does microservices counts? because most backends are talking to other backends these days with many other languages too

Top 10 millions websites according to Alexa or top 1 million websites according to Tranco, so no micro services.

I don't use PHP personally as a developer but most of the things I self host are written in PHP, (NextCloud, BookStack, FreshRSS, RSS-Bridge, etc).

Yes there are faster, easier, and more elegant languages but PHP isn't going anywhere.

PHP is still by far the most used server-side language

...due to WordPress, I'm guessing.

This is fascinating as it goes contrary to the Google Trends data on a number of languages. For example google trends interest in Ruby peaked in like ~2011 and has been on the decline, however this shows that actual usage of ruby in production has been steadily increasing year over year since then and is now second only to ASP.NET and PHP.

This suggests that company adoption either doesn't perfectly track with or significantly lags behind community interest (by ~10 years), which is something I think we all know is true but this is the first time I've seen it measured in a meaningful way.

I don't understand how this methodology works. They claim "We investigate technologies of websites, not of individual web pages. If we find a technology on any of the pages, it is considered to be used by the website."

So then how on earth do they arrive at the claim that only 1.5% of websites use 'static content'? I would be astounded to discover that 98.5% of sites are using a serverside rendering technology to deliver every single page on their site (let alone their CSS, javascript, images, favicons, robots.txt files...)

I'm surprised nobody have linked the infamous "a fractal of bad design" article yet. It's particularly popular with people who have never written a line of PHP in their lives.

Also very popular with people who do write PHP for a living.

Did a quick skim again and seems a lot of the complaints are outdated by now, but probably no hope to see the author to update their rant.

About a quarter of the article was invalid already at the time of its publishing, and another quarter was the author failing to contain their personal preferences from becoming vitriolic "arguments". But PHP does indeed still have quirks.

It sure resonated with me, the occasional PHP user. Though I get that you can poke holes in anything.

You can, but "fractal of bad design" isn't really playing that game. The naming schemes for example. It's not that PHP made a choice and any choice can be criticised, the criticism is that PHP declines to make any choice whatsoever on naming. str-foo strFoo str_foo and FooStr are all defensible choices but having all four in your language is not.

That doesn't make the language less capable or less suitable. That's just an irregularity, causing an itch in certain people's heads. Personal preferences and obsessive-compulsive disorders don't make good arguments.

> Personal preferences and obsessive-compulsive disorders don't make good arguments.

And yet here you are defending PHP and indeed claiming that 'A fractal of bad design' was "particularly popular with" people who haven't written any PHP. Your poor paste is also not a good argument.

It was a completely terrible language and now it's merely mediocre. And yet, it has a particular niche because among other reasons lots of cheap bulk hosts throw in PHP hosting in their default package. It's popular for the same reason all those 1980s kids learned BASIC. BASIC isn't a good programming language, but it is a programming language and there were few other choices available to them.

> And yet here you are defending PHP and indeed claiming that 'A fractal of bad design' was "particularly popular with" people who haven't written any PHP. Your poor paste is also not a good argument.

I claim so because the article was, and is. It's not me defending the language per se - I have no particular feelings or preferences for PHP - but just setting the record straight in the same way I'd reply to a false or incorrect statement on any other topic. I've seen more than enough unsubstantiated lamenting over PHP from people with little or no experience of the language. The article is more than anything else cited in blasé fashion by commenters who disappear after coughing up a link to the article, failing to follow up with actual solid arguments when asked why PHP would be incapable or unsuited for its tasks. I don't know what paste you are referring to. All of my comments are my own.

> It was a completely terrible language and now it's merely mediocre.

A terrible language is one that just can't get things done without irate jumping through hoops, but that's simply not the case of PHP. That's an objective fact, not a subjective opinion or feeling. While I don't use PHP much these days I still know the language very well, and on that technical and substantial merit I disagree.

That is a flawed argument, why? Because BASIC died, so if we follow your analogy PHP would also have died after the initial popularity and then been replaced with something better, but that hasn't happened, thus there are some unique qualities with PHP that makes it hard to replace.

I like seeing trace amounts of Erlang on there!

I've been using YAWS as my web back-end for work projects, and a lot of my co-workers either raise an eyebrow or straight-up balk at it. Fair enough, it's pretty obscure, and the syntax isn't super friendly.

But then I watch them endlessly upgrade libraries, maintain toolchains, deal with exploits, etc etc, while my code sits on decades-old nuke-proof bedrock that no hacker in their right mind would waste time targeting (and likely would find impenetrable had they tried)

We keep "trying" to rewrite a legacy application, and said rewrite keeps failing, then we end up with what we tried to avoid in the first place: A Frankenstein one-off for some specific project.

A lot of people sing the praise of everything being type safe, but I think the dynamic typing of Php and its synchronous nature are what make it so productive.

Also, at least compared to its C# Frankenstein cousin, uses a fraction of the resources to do MORE work, that still amazes me TBH...

How is this state even determined? If we exclude Facebook & Wikipedia how much market share is left after that?

I ask as the statistic seems to be projecting that it is the most popular amongst people, but it feels like it is a legacy language. Maybe adding in how much new server unrelated to the legacy apps are written in PHP would be a good contrast.

So what's considered the cool stack right now? Being a PHP developer who built my own web app, NannyLogic, that's making money and love it, but also being fairly new to programming, I'm not really aware of what is or isn't cool in hacker circles but I'd be interested to learn new things.

As the famous adage say: There are people who write blog post and there are people who write code.

It is interesting that asp.net has been falling like a rock despite .net core. Any idea why?

Outside of Wordpress, I don't think the PHP ecosystem is in a great state. I worked with it recently and the availability of 3rd party libraries wasn't great. A lot of them were abandoned. Python and JavaScript have healthier ecosystems.

Symfony is very healthy plus there are a load of packages around Laravel and Symfony that can be used independently

Does anyone have experiences with the HHVM stack?


It looks interesting to me since it is written in PHP, C++, OCaml and Rust.

I would put wordpress on that graph just to see how much it pulls by itself

Nobody tell Jeff Attwood, he chose a complex tech stack for Discourse 10 years ago, with the explicit aim that it would be so easy and powerful that the “PHP virus” would be defeated.

I wonder if this is because the report includes wordpress web sites.

Wordpress is just a content management system built on top of php. It would be silly not to include everything that is built in php. Most php developers do not code in raw php (when avoidable). Most modern websites that are custom built tend to be a php framework.

I don't say otherwise, but there is a difference between using a platform and using a language directly.

Definitely, most web programmers don’t code directly in the language though. Core library devs will but most others use a framework of some kind that abstracts the developer away from the raw code. This helps speed things up in terms of developing, helps other programmers quickly begin to assist with pre existing projects and also provides standard prebuilt methods for handling authentication, sanitization

Why wouldn’t it?

I'm sure it does, but that then mostly changes the meaning of "most used...language" to mean most used by end users, versus most used by developers.

Which I suppose you could argue, since it's likely passing through apache/nginx, which is fronting wordpress. So maybe 'C' is the most used.

... and indeed PHP itself is written in C.

They say they use publicly available information about sites, plus scraping metadata from the sites, but do not reveal the blend between those sources.

If they're relying primarily on scraping (which I have to think they are, given the scale of the operation otherwise), they're really measuring "what proportion of sites make use of languages which we can easily fingerprint in their stacks".

What I think this is telling us is that WordPress is popular, that WordPress is written in PHP, and that PHP is profligate in its use of headers that announce its usage. That doesn't seem very interesting.

The article emphasizes "server-side", which to me translates into "the most deployed..."

Yes, I don't say it's wrong, I'm just curious.

The implication is that WordPress sites don't represent what people are using to build software these days. This may or may not be a valid point of view depending on what you really want to know.

Not the implication is that wordpress is mostly a no code platform, so it would be interesting to have numbers for languages when people need to produce custom code.

if frameworks in other languages were compelling to use in place of wordpress, we wouldn't even be having this discussion right now

Framework != CMS

Most wordpress freelancers don't code, they configure or install plugins. Somebody using rail, django or laravel is going to code.

I agree. It would be interesting to see the PHP sites broken down into wordpress and non-wordpress

Why? They're both PHP

I think the more interesting breakdown (which admittedly would be damn hard to get) would be WordPress sites with/without custom PHP running.

"Anyone" can make a website with WordPress, but how many WordPress websites have programmers writing code for the website?

Because using a cms doesn't mean people chose a dev stack but rather a platform. The conclusion is not the same. E.g: most wordpress freelancers do not code.

How do they measure it? I can't seem to find their method.

So... how many of the sites use an unknown language?

Without this stat, all the other numbers are irrelevant, except to tell how many sites leak implementation details unnecessarily.

We run a few websites with the backend written in Python or Go. Neither provides information about that; there's only a Server: nginx header (which seems quite unnecessary too).

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact