Is PHP Declining In Popularity? (infoworld.com) 94
The PHP programming language has sunk to its lowest position ever on the long-running TIOBE index of programming language popularity. It now ranks #17 — lower than Assembly Language, Ruby, Swift, Scratch, and MATLAB. InfoWorld reports:
When the Tiobe index started in 2001, PHP was about to become the standard language for building websites, said Paul Jansen, CEO of software quality services vendor Tiobe. PHP even reached the top 3 spot in the index, ranking third several times between 2006 and 2010. But as competing web development frameworks such as Ruby on Rails, Django, and React arrived in other languages, PHP's popularity waned.
"The major driving languages behind these new frameworks were Ruby, Python, and most notably JavaScript," Jansen noted in his statement accompanying the index. "On top of this competition, some security issues were found in PHP. As a result, PHP had to reinvent itself." Nowadays, PHP still has a strong presence in small and medium websites and is the language leveraged in the WordPress web content management system. "PHP is certainly not gone, but its glory days seem to be over," Jansen said.
A note on the rival Pypl Popularity of Programming Language Index argues that the TIOBE Index "is a lagging indicator. It counts the number of web pages with the language name." So while "Objective-C" ranks #30 on TIOBE's index (one rank above Classic Visual Basic), "who is reading those Objective-C web pages? Hardly anyone, according to Google Trends data." On TIOBE's index, Fortran now ranks #10.
Meanwhile, PHP ranks #7 on Pypl (based on the frequency of searches for language tutorials).
TIOBE's top ten?
"The major driving languages behind these new frameworks were Ruby, Python, and most notably JavaScript," Jansen noted in his statement accompanying the index. "On top of this competition, some security issues were found in PHP. As a result, PHP had to reinvent itself." Nowadays, PHP still has a strong presence in small and medium websites and is the language leveraged in the WordPress web content management system. "PHP is certainly not gone, but its glory days seem to be over," Jansen said.
A note on the rival Pypl Popularity of Programming Language Index argues that the TIOBE Index "is a lagging indicator. It counts the number of web pages with the language name." So while "Objective-C" ranks #30 on TIOBE's index (one rank above Classic Visual Basic), "who is reading those Objective-C web pages? Hardly anyone, according to Google Trends data." On TIOBE's index, Fortran now ranks #10.
Meanwhile, PHP ranks #7 on Pypl (based on the frequency of searches for language tutorials).
TIOBE's top ten?
- Python
- C
- C++
- Java
- C#
- JavaScript
- Go
- Visual Basic
- SQL
- Fortran
The next two languages, ranked #11 and #12, are Delphi/Object Pascal and Assembly Language.
"Popularity" is subjective (Score:5, Interesting)
Re: (Score:1)
Go. Go. Do it :) (Score:2)
Go. Go. Do it :)
Re:"Popularity" is subjective (Score:5, Insightful)
If your metric is either "lines of code being executed daily" or "lines of code in production" the winner is probably COBOL.
And despite the story here, it might be PHP.
Re:"Popularity" is subjective (Score:4, Interesting)
If your metric is either "lines of code being executed daily" or "lines of code in production" the winner is probably COBOL.
And despite the story here, it might be PHP.
Uh, according to Github (yes its a sample but its a pretty good one) its Java by a mile followed by SQL then Python. That's an actual measure of lines of code written. On the other hand, this specific measure looks at questions posted to the net as a proxy for how much code is written in each language. That's pretty questionable as this seems to heavily weight things towards the languages with the lowest quality (read cheapest) developers, not the total amount of code written. I can't remember the last time I posted a question about programming to the net. I have written millions of lines of code over the period since I might have posted a question decades ago. None of that is captured by this metric. That's why its such a questionable metric and seems to be very biased towards languages that perhaps are not of the highest quality.
Re:"Popularity" is subjective (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2)
Maybe if PHP would stop breaking backwards compatibility between every point release, people would trust PHP is stable.
It isn't. I has never been. The most stable it's ever been was 5.6 , After that PHP just breaks all the glass doors and mirrors to play the version bloat game with Firefox, Chrome and FreeBSD.
Counting the wrong things, perhaps? (Score:5, Insightful)
Between WordPress, Joomla, and Drupal, it's a bit of a stretch to say PHP's the past. If it is, so is the entire web.
Re: (Score:2)
Re: (Score:2)
Those 3 CRMs equate to a pretty large chunk of it.
Re: (Score:2)
Re: (Score:2)
I guess it just depends how you're measuring things. For example, I would say that Clover POS systems are everywhere these days. You could counter by saying, "Well, Walmart doesn't use Clover and I wouldn't be surprised if they ring up more transactions daily than all those small businesses with Clover devices." Both can be true.
I bet the average person visits at least one PHP-driven site per day, even if they tend to stay within the confines of social media and YouTube. You might check the menu of a restau
Re: (Score:2)
What you come across during your regular browsing experience doesn't equate the entire web.
Your statement is true, if silly, and completely nonsensical.
Re: (Score:1)
What you come across during your regular browsing experience doesn't equate the entire web.
OP: As I drive through neighborhoods, most yards are grass.
YOU: ONE YARD ISN'T GRASS! YOU ARE WRONG!!!!
You probably also voted for Trump.
Re: (Score:2)
You're probably one of those people that can't figure out how to get an ID but still gets to vote.
Re: (Score:2)
Re: (Score:2)
Sure. The software that runs the majority of the entire web doesn't count. Got it.
Re: (Score:2)
Re: (Score:2)
writing complex logic in HTML templates is bad news, and rightly or wrongly, that's one of the things PHP is known for
That's not how PHP is used any more, at least, not the bulk of the use. Now we use frameworks based on frameworks, for example Drupal based on Symfony, and the only PHP that's in HTML templates is related to the theme. The rest of the PHP is in some other file (or, more likely, spread across multiple files.)
Context much? (Score:4, Funny)
Re: (Score:2)
Re: (Score:2)
You forgot COBOL's ALTER statement. I've used them all. And will burn in Hell.
Re: (Score:3)
And --- FORTRAN's Arithmetic IF. I should be done to a turn shortly.
INTERCAL forever! (Score:4, Funny)
It's dying. (Score:1)
Just like BSD.
It's community is beleaguered.
Netcraft confirms it.
Not sure how good this ranking is (Score:2)
Errrm, .... no, not really. (Score:4, Informative)
60%+ of the webs logic runs on PHP. It may be way less necessary to build massive new systems with any language, be it PHP or anything else. But as a runtime PHP is as popular and required as ever. The top ten of the webs systems run almost exclusively on PHP, all other technologies are dwarfs in comparison.
Re: (Score:3)
A website I visit occasionally has suffered two serious outages in the past 3-4 years, both times because the hosting company installed a new version of PHP.
The first outage lasted several weeks, and the site has never regained the original full functionality it lost back then. The second outage was just a couple of days, and may well have been "fixed" by reinstalling the older PHP.
Both times it was an older, buggy version with known security holes which had been replaced (I think there had been a security
Re: (Score:3)
Don't blame incompetence of the software engineers and system administrators on the language. There are plenty of tools (such as PHPCompatibility and Rector) that help update code so it is compatible with newer versions of PHP.
Re: (Score:3)
Re: (Score:2)
The "PHP a fractal of bad design" is 12 years old... the PHP engine has been revamped so much that that document reads very much as a joke now. Yet ignorant people keep pointing to it...
Re: (Score:2)
That was 12 years ago. A 12 year out of date critique of a web technology that has had ongoing language updates and two entire rewrites in that interval should be viewed with some suspicion. Also, are you really just citing the title of the article and none of the content?
I'm not even defending PHP here, just questioning lazy kneejerk, "but it sucked once, so now I hate it forever" thinking.
PHP 8 != PHP 5.3 (Score:2)
For color, the best critique of PHP is entitled, "PHP a fractal of bad design."
Eevee's article from April 2012 [eev.ee] was about PHP 5.3, not PHP 8. PHP versions 5.4, 5.6, and 7 came out soon afterward, fixing a lot of the flaws she pointed out. A retrospective eight years later [maettig.com] showed how much the language had progressed on the road to 8.
A company doesn't get sold ... (Score:2)
... only because some piece of software doesn't scale. Given, if you're hosts are clobbered with legit requests and you're still relying on uncashed PHP monoliths to handle the load you're being silly and should be let near a live server setup, but there are plenty of examples of perfectly successful large-scale companies built on PHP. Like Facebook for instance. ... Given, they eventually just built Hack which is basically a binary compiler for an updated PHP dialect, but the old saying goes for PHP just a
Re: (Score:2)
Re: (Score:3)
Persistently Hectic Programming (Score:3, Insightful)
Anyone who's ever seen the inside of any PHP files should know that this language deserves to die out. PHP was never intented to be a programming language in the first place but rather was a simple attempt at creating web CGI apps to manage the personal web page of its creator (hence hame Personal Home Page [Tools]). Because of that, it's grown in strange and often incomprehensible ways, like an octopus growing yet another tentacle, and it shows. Let it die peacefully.
Re: (Score:2)
PHP used to be very bad, it was everything you describe. Now PHP is pretty good, and it's even very convenient to run multiple versions using FPM. Somehow most web hosts still fuck up hosting PHP though.
I won't make a new project with it (Score:1)
Look we have to part ways. The people steering it want it to be java and I want it still to be a nice easy hackable language.
they are slowly removing the dynamicness from the language and making backward incompatible changes, I'd give my left nut just to have a more compact array initialisation as we spend so much time passing around options to frameworks *
Javascript is now good enough.
I aim to finish my career never having had to program in Python.
hopefully i wont have to port my app to php 8 as it looks l
Re: (Score:1)
Starting from ecosystem issues such as the too many package managers, none of which is both fully featured and widely used, or the multiple datetime libraries, down to details such the weird ways of declaring static methods vs. static class members, how None converts to "None" instead of "", mutable default arguments or how type
Have you tried Drupal? (Score:2)
Have you tried working with Drupal, which only improves as time passes? Drupal is a LAMP CMS used by many governments [drupal.org], universities, and corporate websites. My point is, sure it's written in PHP, while Drupal offers many secure and feature rich APIs which bring developers to a whole other level.
Here's a book recommendation: Drupal 10 development cookbook, by Matt Glaman and Kevin Quillen, published by Packt [packtpub.com]
There's nothing wrong with PHP, and Drupal can be served quite fast. If speed and cost are your concer
Re: (Score:1)
As for me, eZPlatform (ex eZPublish) has been paying my bills since 2007.
To this day, I still find it a better CMS than Drupal - even though I think it peaked around version 4.7...
Re: (Score:2)
Re: (Score:1)
Sorry you picked the wrong CMS
Re: (Score:2)
Re: (Score:1)
As for Pip, it might be just me, but it seems stuck in the 90s, when it was not yet necessary to update your project's (transitive) dependencies every other week - which is sadly a fact of life for anything exposed to the we
Do web searches reflect popularity? (Score:4, Interesting)
I think the ranking is based on web searches.
The ranking could be misleading because some languages are harder than others. For example, Python has a different file layout style to other languages by having significantly important amounts of leading whitespace for delimiting codeblocks. Could it be that people search about the idiosyncrasies of a specific computer language because that language is alien to them?
Also, older computer languages (pre world-wide-web) have written manuals and books to describe the usage of the language. Perhaps, these developers sill access this written material on their desks so no internet search is needed ? For example, Programming the Z80 by Zodney Zaks circa 1979.
Think about how bad programming language would appear in the rankings ? I think a bad language would be highly ranked due to the difficulty in using the language.
I think Perl is easier to grasp than Python. Perhaps that is why Perl is ranked lowly as it is too easy to use?
There are multiple variants of C from K & R, ANSI C (C89) up to C23. I wonder which variant is the most popular ? But I think this ranking scheme will misidentify the most popular (mostly used) variant of C.
Re: (Score:2)
TIOBE's rankings have always been useless. If you aren't tracking what a majority of projects/webpages/products are actively using, then the rankings are useless.
C is just a garbage language all around anyway. Perl is just as bad as C.
Re: Do web searches reflect popularity? (Score:2)
Yet the kernel of whatever OS you're using is almost entirely written in C whether its windows, linux, mac, iOS, iPadsos or android.
Horses for courses mate, you stick to your scripting and us C/C++ guys will stick to the low level stuff that's too difficult for you.
Re: (Score:2)
C/C++ isn't difficult, just garbage. C++ is less garbage than C, however. Neither of them is low level, they are intermediary languages. There are only two true low level languages - assembly and machine. And just because C is what is used doesn't make it any less ass of a language. While it's very technically functional, the whole design of the language is fucking terrible. The only other widely used language I've seen with a worse overall design is React.
Re: (Score:2)
Re: (Score:2)
Just because there are times to use something and just because it's widely used, doesn't mean it's "nice". It's not. It's nicer than C, but it is not nice. Either way, the main complaint is still about C and less so C++. C++ was only brought in to the mix by Viol8.
Also, assembly and machine are not the names for the things you are referencing.
I know exactly what I'm referring to. You're just using very specific language to describe the same thing.
Re: (Score:2)
Most languages have cons as well as pros. Python has its meaningful whitespace BS and typeless variables. JS also has typeless variables that have led to god knows how many bugs over the years. Java is slow and bloated, C# is ok but can't do any low level and to do anything serious Windows specific whatever the Mono crowd may say.
Yes C has its faults but its lasted 50 years so must be doing something right because no language has enough inertia to last that long if its total crap.
Re: (Score:2)
I think Perl is easier to grasp than Python. Perhaps that is why Perl is ranked lowly as it is too easy to use?
I still prefer perl to python/php/etc., but - it seems pretty clear to me, from various personal interactions, that perl is not a language most people learn nowadays.
And (speaking to another point in your post) I did learn perl mostly from a book - actually two books. "Learning Perl" and "Programming Perl", both published by O'Reilly. The first editions where on stone tablets, IIRC.
Obligitory XKCD reference (Score:2)
If they're directly ranking "matlab" vs "php" (Score:5, Insightful)
It's pretty obvious this "popularity" index isn't telling us anything particularly useful in the real world.
Node Did It (Score:1)
Re: (Score:2)
The main problem with Node is NPM's security situation right now is about where PHP's was 10 or so years ago. Every month or two it seems we learn about yet another significant security problem.
Re: (Score:1)
TIOBE Index (Score:4, Insightful)
Can we PLEASE stop with the fucking TIOBE Index!? Its total bullshit. Its based on things like StackOverflow posts and Google results.
The difference? PHP's documentation ISNT SHIT like most other languages, so there are less people posting about it. Every single function/method has its own dedicated page, with full documentation on input/output parameters, with example code, and then an entire section below on user contributed comments to add additional details the docs are missing. No need to go to 3rd party sites to get that level of details. And on top of that, the UX/UI is visually decent where it isn't hard to figure this information out.
Other site's documentation is absolute garbage. I freaggin HATE dealing with Python's docs for example. These other sites are written in ways that leave certain aspects of their libraries up to vague interpretations, which is exactly why things needs external web sites to be explained.
And then the fucking TIOBE Index sees these extra sites and just assumes "more sites = more popular" which is total asinine, then every idiot journalist on the web quotes the fucking TIOBE Index as "OH EM GEEZ THIS LANGUAGE IS DEAD BECAUSE IT DROPPED 1 PLACE IN A YEAR"
Use the best tool for the job, it is that simple. And for web applications, PHP is a shitton easier to get up and running than Python because it was DESIGNED for the web first and foremost. (not even going to get into the rant about every other language on that list and how they're all misrepresented in one fashion or another)
Re: (Score:2)
Can we PLEASE stop with the fucking TIOBE Index!? Its total bullshit
It doesn't matter if it's BS. What matters is that it creates engagement. If an article generates page views and comments, there will be more similar articles.
If you don't like stories about TIOBE, don't read them or comment on them.
Re: (Score:2)
Re: (Score:2)
Can we PLEASE stop with the fucking TIOBE Index!? Its total bullshit. Its based on things like StackOverflow posts and Google results.
Amen to that. I still don't get why this is news just about every single month.
I'm guessing slashdot has a deal with Tiobe, so they get a cut of the ad revenue.
Re: TIOBE Index (Score:1)
chatgpt will break the tiobe index (Score:1)
Google Trends becomes more and more irrelevant. I have not used Google for programming related questions in months, I use chatgpt.
Code quality. (Score:2)
I hope your employer does not care about the resulting code quality.
Re: Code quality. (Score:1)
One could hope (Score:2)
Re: (Score:2)
Legacy vs new code (Score:2)
There probably is a lot of existing PHP code that will stick around for a long time. Same as COBOL and Java. In my circles nobody is using any of these languages to start new projects with. I am quite surprised that Java is still a thing. I picked Java for some projects in the past. But it no longer makes any sense except for situations where it is mandated.
Re: (Score:2)
Backward compatibility concerns (Score:4, Insightful)
I just completed a migration from PHP 7 to 8 for an old, 1.5M LOC codebase. I will avoid PHP for new projects based on that experience alone.
The level of disregard for existing codebases in 8 is astounding. Yes, languages or features need to evolve, and historical baggage and design mistakes can be annoying or ugly. But the downstream effects of changing those things can be truly immense and sometimes it is better to just live with the warts. The current PHP steering committee seems to want PHP to be an entirely different language than it was 20 years ago and we're all paying the price in man-hours and surprise bugs. They have changed so, so many things, and some of those things are mind-boggling language fundamentals such as type coercion rules that are difficult if not impossible to detect and warn about in advance.
Re: (Score:2)
I can't believe they managed to break each(). Every time a new version of PHP is released, everything breaks. It's not just my own project that has to be rewritten on each new release, I have to wait for updates to all of my other 3rd-party scripts, too.
Disclaimer: I stopped using PHP about 10 years ago. My single PHP project is just in maintenance mode, so I'm not even adding new features -- all of my rewrites are just to make up for the PHP team's stupidity.
Re: (Score:3)
I've always said the same thing about python. It's incredibly popular, every other project you find online seems to be written in it, and I don't think I've ever had anything run without many trips to google to figure out why a python3 project can't run in python310 or any other version other than the one the author used. It's a language that has SEVERAL methods of isolation in order to resolve dependency hell. Containers are practically python isolation units that have a side-effect of being useful for oth
Re: (Score:1)
Up to the move from 7 to 8, PHP had in fact quite a good track of keeping BC. The last time changed so dramatically was when switching from 4 to 5, in 2004.
I can not compare to all other widespread languages, as I don't use them on a daily basis, but much better than Python, for sure.
Sure, there are changes in each and every release, and as we know every bugfix can be perceived as a painful BC breakage by developers (cue the obligatory XKCD - nr. 1172...). But most of the time, if your program b
usage (Score:2)
It might be the case that not that many people *write* in PHP and instead just deploy WordPress with a ton of plugins.
TIOBE is a troll (Score:2)
That index is so out of touch with reality that it looks like its only purpose is to generate engagement by having people talk about how bad it is.
The Pypl index is debatable, but at least, it kinds of make sense. TIOBE doesn't.
Time for my 90s phrase (Score:2)
*BSD is dying! (Score:2)
Wasn't it BSD? Now it's PHP?
STOP. TAKING. TIOBE. SERIOUSLY. (Score:1)
100,000 WordPress plugins (Score:2)