News: 0173523070

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Is PHP Declining In Popularity? (infoworld.com)

(Sunday April 14, 2024 @04:59PM (EditorDavid) from the protect-and-server dept.)


The PHP programming language has sunk to its lowest position ever on the long-running [1]TIOBE index of programming language popularity. It now ranks #17 — lower than Assembly Language, Ruby, Swift, Scratch, and MATLAB. [2]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 [3]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 [4]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.



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

[2] https://www.infoworld.com/article/3715043/php-sinks-in-tiobe-language-popularity-index.html

[3] https://www.infoworld.com/article/3687219/whatever-happened-to-ruby.html

[4] https://pypl.github.io/PYPL.html



"Popularity" is subjective (Score:3)

by kmoser ( 1469707 )

If your metric is either "lines of code being executed daily" or "lines of code in production" the winner is probably COBOL.

Re: (Score:1)

by tonytins ( 10331799 )

Seriously. Someone should start pitching up another rival index to compare, if there isn't one already.

Re:"Popularity" is subjective (Score:4, Insightful)

by RazorSharp ( 1418697 )

> 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: (Score:2)

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

Counting the wrong things, perhaps? (Score:3)

by RonVNX ( 55322 )

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:1)

by CurlyBraces143 ( 8663915 )

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

Re: (Score:2)

by RazorSharp ( 1418697 )

Those 3 CRMs equate to a pretty large chunk of it.

Re: (Score:2)

by MikeDataLink ( 536925 )

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

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.

Context much? (Score:3)

by byronivs ( 1626319 )

I totally refactored all my sites to FORTRAN just to stay in the top 10. Works great.

Re: (Score:2)

by 14erCleaner ( 745600 )

Nothing says "professional programmer" like using assigned or computed GOTOs. Today's code kiddies don't know the meaning of suffering.

Re: (Score:2)

by thragnet ( 5502618 )

You forgot COBOL's ALTER statement. I've used them all. And will burn in Hell.

It's dying. (Score:1)

by MrNaz ( 730548 )

Just like BSD.

It's community is beleaguered.

Netcraft confirms it.

Not sure how good this ranking is (Score:2)

by Veretax ( 872660 )

Ranking it based on some order... and wow they are lower, there are new languages almost every year.

Errrm, .... no, not really. (Score:4, Informative)

by Qbertino ( 265505 )

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)

by Vlad_the_Inhaler ( 32958 )

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)

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.

Re: (Score:2)

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.

Persistently Hectic Programming (Score:2, Flamebait)

by devslash0 ( 4203435 )

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.

I won't make a new project with it (Score:1)

by dangordon ( 10355950 )

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)

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

Do web searches reflect popularity? (Score:3)

by skullandbones99 ( 3478115 )

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)

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.

Re: Do web searches reflect popularity? (Score:2)

by Viol8 ( 599362 )

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)

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.

Re: (Score:2)

by 93 Escort Wagon ( 326346 )

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

If they're directly ranking "matlab" vs "php" (Score:3)

by 93 Escort Wagon ( 326346 )

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

Node Did It (Score:1)

by FairAndUnbalanced ( 959108 )

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?

Re: (Score:2)

by 93 Escort Wagon ( 326346 )

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.

TIOBE Index (Score:4, Interesting)

by darkain ( 749283 )

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)

by ShanghaiBill ( 739463 )

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

chatgpt will break the tiobe index (Score:1)

by bramez ( 190835 )

Google Trends becomes more and more irrelevant. I have not used Google for programming related questions in months, I use chatgpt.

One could hope (Score:2)

by Rujiel ( 1632063 )

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.

Legacy vs new code (Score:2)

by linuxguy ( 98493 )

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.

Murder is always a mistake -- one should never do anything one cannot
talk about after dinner.
-- Oscar Wilde, "The Picture of Dorian Gray"