Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
PHP Programming Stats

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?
  1. Python
  2. C
  3. C++
  4. Java
  5. C#
  6. JavaScript
  7. Go
  8. Visual Basic
  9. SQL
  10. Fortran

The next two languages, ranked #11 and #12, are Delphi/Object Pascal and Assembly Language.


This discussion has been archived. No new comments can be posted.

Is PHP Declining In Popularity?

Comments Filter:
  • by kmoser ( 1469707 ) on Sunday April 14, 2024 @11:38AM (#64393618)
    If your metric is either "lines of code being executed daily" or "lines of code in production" the winner is probably COBOL.
    • Seriously. Someone should start pitching up another rival index to compare, if there isn't one already.
    • by RazorSharp ( 1418697 ) on Sunday April 14, 2024 @12:51PM (#64393738)

      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.

      • by sfcat ( 872532 ) on Sunday April 14, 2024 @05:57PM (#64394160)

        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.

    • by keltor ( 99721 ) *
      I doubt that. Mostly because most of the core cobol applications are small (50k LoC) and surrounded by millions of lines of code written in other more modern languages. Often that cobol application is also running on ancient super slow hardware. I actually bet that it's #1 C (embedded shit), #2 JavaScript (5 Billion plus web browser on a daily basis), and #3 PHP (Word Fucking Press) #1 Reason Cobol still exists: Nobody in IT Management is willing to stake their careers on replacing old and very much "wo
    • by Kisai ( 213879 )

      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.

  • by RonVNX ( 55322 ) on Sunday April 14, 2024 @11:44AM (#64393624)

    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.

    • Comment removed based on user account deletion
      • Those 3 CRMs equate to a pretty large chunk of it.

        • by sfcat ( 872532 )
          I would bet YouTube by itself has more hits than all of the sites that use those 3 CRMs combined. And none of the big sites use PHP (no FB doesn't count, they rewrote the language themselves multiple times and it isn't PHP anymore). Also, FB seems to hire a lot of Scala and Java programmers for a PHP shop.
          • 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

      • What you come across during your regular browsing experience doesn't equate the entire web.

        Your statement is true, if silly, and completely nonsensical.

      • by Anonymous Coward

        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.

        • OP: Yeah and that one yard is bigger than all those other neighbourhoods we drove through combined.

          You're probably one of those people that can't figure out how to get an ID but still gets to vote.
    • LOL umm those names don't help that case.
  • by byronivs ( 1626319 ) on Sunday April 14, 2024 @11:53AM (#64393632) Journal
    I totally refactored all my sites to FORTRAN just to stay in the top 10. Works great.
  • Just like BSD.
    It's community is beleaguered.
    Netcraft confirms it.

  • Ranking it based on some order... and wow they are lower, there are new languages almost every year.
  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Sunday April 14, 2024 @12:31PM (#64393694)

    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.

    • 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

      • by wimg ( 300673 )

        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.

        • by sfcat ( 872532 )
          For color, the best critique of PHP is entitled, "PHP a fractal of bad design.". So I don't think the PHP folks can really throw shade at anyone. Also, companies that use PHP (and make the bulk of their revenue from the web) don't usually stick around. I worked for a company whose advertisements you have probably seen and who count 1/3 of the US population as their user base. It is no longer an independent company anymore mostly because they foolishly built their original site on PHP and never switched
          • by wimg ( 300673 )

            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...

          • 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.

          • 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.

          • ... 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

    • by keltor ( 99721 ) *
      Despite this, it's doubtful that there's much new code being written for it because those vendors. And that's what the TIOBE index is about, languages used to write new code.
      • by sfcat ( 872532 )
        No, its about languages used to write new code, weighted (heavily) by how poor the developers in that language are. PHP has the "advantage" of having a lot of poor developers who post lots of questions to reddit. Java on the other hand has far more programmers who end up asking fewer questions. That isn't because lots of code isn't written in Java. Its because a lot of people who should be working at Starbucks got jobs writing PHP code. And that doesn't really translate into new LOCs the way
  • by devslash0 ( 4203435 ) on Sunday April 14, 2024 @12:46PM (#64393724)

    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.

    • 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.

  • 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

    • by giuntag ( 833437 )
      Having recently started dabbling in Python after many years of PHP, I'm surprised to find it, despite its increasing popularity, less well architected, coherent and pleasant to use.
      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 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

        • by giuntag ( 833437 )
          Not sure you wanted to reply to my comment, or the parent.
          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...
        • I have tried Drupal, and still have a few sites that use it. According to its own statistics, its popularity has declined from 1.2M sites in 2016, to 0.67M sites today: https://www.drupal.org/project... [drupal.org] Drupal used to break compatibility with each major version. So there are still Drupal 7 sites that do not have a simple upgrade procedure to get to Drupal 10. It has lots of contributed modules that are no longer compatible with the latest version, because who wants to keep migrating old modules to Drupa
          • by giuntag ( 833437 )
            That's in fact one of the things which eZPublish always did better than Drupal - have a great focus on BC.
            Sorry you picked the wrong CMS ;-)
      • Python really only has two package managers. The "old" (and I would argue, far simpler, and thus better): "pip" and the newer (and I would argue Systemd of Python): poetry. Either will get you where you're going. If you want to move quickly, and don't want to learn a bunch of annoying setup, I highly recommend sticking to pip and a requirements.txt file. If you want virtual environments, you can either go directly to venv, but I prefer pipenv. Poetry will do all of the above for you, but at the expensiv
        • by giuntag ( 833437 )
          I sure hope that Poetry won't be the only Python package manager going forward, as I just settled on PDM instead - the feature set looked similar, but there were far fewer horror stories about bugs and disregard for api/abi breakages (which is paramount for any dev tool in daily use) :-D

          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
  • by skullandbones99 ( 3478115 ) on Sunday April 14, 2024 @01:08PM (#64393762)

    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.

    • by Bahbus ( 1180627 )

      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.

      • 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.

        • by Bahbus ( 1180627 )

          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.

          • by sfcat ( 872532 )
            No, its just too hard for you and you are projecting your own issues onto a piece of technology to make yourself feel better. C++ is quite a nice language and there are times to use it. There are plenty of times to use something else. Right tool for the right job and all that. Also, assembly and machine are not the names for the things you are referencing. There is assembler which is a CPU independent instruction set and there are chip specific instruction sets that are created by translating from asse
            • by Bahbus ( 1180627 )

              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.

          • by Viol8 ( 599362 )

            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.

    • 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.

  • by 93 Escort Wagon ( 326346 ) on Sunday April 14, 2024 @01:30PM (#64393784)

    It's pretty obvious this "popularity" index isn't telling us anything particularly useful in the real world.

  • The advent of NodeJS as a suitable backend has made PHP less interesting. It seems like you nearly always end up using some Javascript in your PHP apps, so why not just use Javascript?
  • TIOBE Index (Score:4, Insightful)

    by darkain ( 749283 ) on Sunday April 14, 2024 @02:22PM (#64393846) Homepage

    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)

    • 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.

      • by kmoser ( 1469707 )
        Someone should write a language called TIOBE. Then, based on web discussions of TIBOE (the index), TIOBE (the language) will automatically rank as the most popular language.
    • 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.

    • And another important thing to note is that ai has learned from the content of the past. I can ask ai almost anything about php and get a decent answer, while newer languages and frameworks always need to be researched and asked help for manually
  • Google Trends becomes more and more irrelevant. I have not used Google for programming related questions in months, I use chatgpt.

  • I forget who said this (maybe xkcd) but PHP is the Winchester mystery house of programming languages. You get a hammer that's better used as a screwdriver, a screwdriver that is better as a wrench, etc.
  • 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.

    • C# and arguably Java are among the very few platforms that make sense for bespoke line-of-business applications, which probably constitute the majority of new code being written. C# for me, because Oracle, but lots of people who are either braver, and/or more trusting than myself, choose Java instead.
  • by whiteinge ( 74066 ) on Sunday April 14, 2024 @05:14PM (#64394100)

    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.

    • 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.

      • 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

        • by giuntag ( 833437 )
          Fully agree.

          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
  • It might be the case that not that many people *write* in PHP and instead just deploy WordPress with a ton of plugins.

  • 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.

  • "That's not how this works ... that's not how any of this works ..."
  • Wasn't it BSD? Now it's PHP?

  • Why are people posting about TIOBE? Cheap meaningless aggregations of search results are cheap, meaningless aggregations.
  • There is something on the order of 100,000 WordPress plugins ... maybe people are finally running out of new things to use PHP for in this domain which accounts for a large amount of the PHP code out there. Someone else made a COBOL comment, in some ways, PHP is the new COBOL. 40% of all websites (but not web pages) are implemented in WordPress which sits on PHP. Its a mature environment that does not appeal to the technos that always want to do the next new thing.

Reality must take precedence over public relations, for Mother Nature cannot be fooled. -- R.P. Feynman

Working...