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
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).
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
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.
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.
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.
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.
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.
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".
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.
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.
"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.
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.
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.
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.)
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.
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 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...
> 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?".
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.
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.
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.
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.
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.
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."
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.
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.
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.
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.
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.
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.
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.
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.
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!
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
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
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.
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.
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.
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.
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.
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).
I am guessing that market share is defined such that each domain backed by a wordpress instance (wordpress being written in php) is counted as one share, and gmail.com is counted as one share (or worse, because the survey cannot programmmatically determine what language gmail.com is written in, it is not represented at all in the count).
I doubt more than 25% of the hours spent by programmers on software that runs on web servers is spent on PHP code.
42% of all websites are on Wordpress, which is written in PHP.[a] The vast majority of those websites use vanilla WordPress out-of-the-box to serve a tiny audience.
If you look at market share by traffic, a much smaller share than 79% of the world's largest web sites (Wikipedia, YouTube, Google, Amazon, Facebook, Twitter, Reddit, Instagram, eBay, PornHub, etc.) run on PHP. Those websites account for the vast majority of Web traffic.
EDIT: I changed "0.0%" to "a much smaller share than 79%" because I was wrong about Wikipedia, Facebook, Pornhub and likely other high-traffic websites. See comments below.
Em... You are very wrong in your own example. Wikipedia, Facebook, and Pornhub use PHP.
Technically though, Facebook uses Hack, a more strictly-typed customized version of PHP for their own uses, but Hack is still mostly compatible with PHP and until recently could process any PHP file directly.
jegea|4 years ago
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!
AzzieElbab|4 years ago
dubcanada|4 years ago
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).
winternett|4 years ago
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
ChrisMarshallNY|4 years ago
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.
Uehreka|4 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.
hexa22|4 years ago
human|4 years ago
clone1018|4 years ago
brightball|4 years ago
People from other languages don’t seem to want to believe it.
BiteCode_dev|4 years ago
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.
smoldesu|4 years ago
nixpulvis|4 years ago
I'm also quite happy to see Ruby continuing to grow in this report.
CWuestefeld|4 years ago
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".
dnautics|4 years ago
gjsman-1000|4 years ago
No regrets because the last few years, never has an ecosystem been so bright.
gjsman-1000|4 years ago
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.
TheCoelacanth|4 years ago
PHP has a huge market share in web sites, but much less in web apps.
SergeAx|4 years ago
MattGaiser|4 years ago
Take a look at the YC job board. A surprising number of the companies use RoR.
turtlebits|4 years ago
goodpoint|4 years ago
The worst aspect of it is how unaware HN is of its biases.
jakearmitage|4 years ago
kodah|4 years ago
blueblisters|4 years ago
cerved|4 years ago
defaultname|4 years ago
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 -
https://w3techs.com/technologies/details/cm-shopify
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.
polote|4 years ago
johntdaly|4 years ago
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.
striking|4 years ago
dncornholio|4 years ago
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.
mathattack|4 years ago
cardanome|4 years ago
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.
jrwr|4 years ago
qsort|4 years ago
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.
goodpoint|4 years ago
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.
gitgud|4 years ago
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...
adventured|4 years ago
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.
clone1018|4 years ago
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?".
WesolyKubeczek|4 years ago
josefx|4 years ago
tored|4 years ago
adventured|4 years ago
easton|4 years ago
minimaul|4 years ago
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.
0x0nyandesu|4 years ago
wongarsu|4 years ago
1: https://insights.stackoverflow.com/survey/2021#technology
chewmieser|4 years ago
Only developers complain about PHP. And even that isn't really warranted anymore as PHP has grown leaps & bounds since most of the hate.
astura|4 years ago
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.
giancarlostoro|4 years ago
oliwarner|4 years ago
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.
jjice|4 years ago
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.
dsego|4 years ago
gabereiser|4 years ago
ychompinator|4 years ago
[deleted]
zurn|4 years ago
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.
uDontKnowMe|4 years ago
manaskarekar|4 years ago
jonwinstanley|4 years ago
pbronez|4 years ago
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:
[0] https://insights.stackoverflow.com/survey/2021?_ga=2.2362093...tored|4 years ago
https://w3techs.com/faq
https://w3techs.com/technologies
https://w3techs.com/disclaimer
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.
jl6|4 years ago
Or claim to.
qsort|4 years ago
Also, I'm surprised Python isn't more popular. 1% is (comparatively) tiny for a language that popular.
julienpalard|4 years ago
Another point of data could be: https://insights.stackoverflow.com/trends?tags=php%2Cpython%...
herbst|4 years ago
formerly_proven|4 years ago
The same goes for pretty much everything on that list which isn't PHP or .NET.
mywittyname|4 years ago
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.
kamaal|4 years ago
The next big thing there is Typescript.
qaq|4 years ago
blodkorv|4 years ago
For me its the perfect language.
ufmace|4 years ago
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.
kreetx|4 years ago
There are other statistics around the web for language use.
gbourne|4 years ago
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.
jonwinstanley|4 years ago
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.
57844743385|4 years ago
250 Ruby ads
420 PHP ads
1600 Java ads
1600 python ads
1300 .NET ads
hexa22|4 years ago
thehappypm|4 years ago
unnouinceput|4 years ago
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.
oefrha|4 years ago
tored|4 years ago
https://w3techs.com/technologies
https://w3techs.com/disclaimer
jefurii|4 years ago
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.
ljoshua|4 years ago
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/
inovica|4 years ago
jalino23|4 years ago
tons of companies use php, my company uses it even for modern development.
get out of your own bubble dude
Majestic121|4 years ago
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 ?
unknown|4 years ago
[deleted]
mjburgess|4 years ago
I suspect one would see the former drop off a cliff, whilst the latter will always be quite high -- due to first-mover effects.
streamofdigits|4 years ago
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.
robertwt7|4 years ago
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
tored|4 years ago
IceWreck|4 years ago
Yes there are faster, easier, and more elegant languages but PHP isn't going anywhere.
cushychicken|4 years ago
...due to WordPress, I'm guessing.
unknown|4 years ago
[deleted]
sam0x17|4 years ago
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.
unknown|4 years ago
[deleted]
jameshart|4 years ago
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...)
daneel_w|4 years ago
capableweb|4 years ago
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.
rich_sasha|4 years ago
btbuildem|4 years ago
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)
tossaway9000|4 years ago
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...
boringg|4 years ago
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.
jimbaxter|4 years ago
BoumTAC|4 years ago
cm2187|4 years ago
FormFollowsFunc|4 years ago
jonwinstanley|4 years ago
gmlamp|4 years ago
https://en.wikipedia.org/wiki/HHVM
It looks interesting to me since it is written in PHP, C++, OCaml and Rust.
unknown|4 years ago
[deleted]
chimen|4 years ago
unknown|4 years ago
[deleted]
BusTrainBus|4 years ago
BiteCode_dev|4 years ago
suifbwish|4 years ago
christophilus|4 years ago
PhantomBKB|4 years ago
CodeyWhizzBang|4 years ago
aynyc|4 years ago
continuational|4 years ago
Without this stat, all the other numbers are irrelevant, except to tell how many sites leak implementation details unnecessarily.
tgv|4 years ago
jmnicolas|4 years ago
I'm surprised by JS low numbers too, I would have thought it was close to PHP.
EastSmith|4 years ago
peanut_worm|4 years ago
I’d be interested in seeing this graph with Wordpress excluded
AndyMcConachie|4 years ago
Programming languages that no one uses.
Programming languages that everyone hates.
mitquinn|4 years ago
hollerith|4 years ago
I doubt more than 25% of the hours spent by programmers on software that runs on web servers is spent on PHP code.
martincmartin|4 years ago
Pensacola|4 years ago
Pensacola|4 years ago
beached_whale|4 years ago
hsn915|4 years ago
Oras|4 years ago
marcodiego|4 years ago
amai|4 years ago
malf|4 years ago
57844743385|4 years ago
draw_down|4 years ago
[deleted]
cs702|4 years ago
If you look at market share by traffic, a much smaller share than 79% of the world's largest web sites (Wikipedia, YouTube, Google, Amazon, Facebook, Twitter, Reddit, Instagram, eBay, PornHub, etc.) run on PHP. Those websites account for the vast majority of Web traffic.
[a] Source: https://wordpress.com
--
EDIT: I changed "0.0%" to "a much smaller share than 79%" because I was wrong about Wikipedia, Facebook, Pornhub and likely other high-traffic websites. See comments below.
gjsman-1000|4 years ago
Technically though, Facebook uses Hack, a more strictly-typed customized version of PHP for their own uses, but Hack is still mostly compatible with PHP and until recently could process any PHP file directly.