OMG, PHP is Losing to Ruby, Python?

by Chris Renner on 1/03/2011

Sorry for the hyperbolic headline, that’s just to get your attention. Now that I have you here, lets have a serious discussion.

The TIOBE Index was just updated with the February programming language rankings, and the PHP community seems to be a mild panic about dropping two spots in the rankings (from 3rd to 5th) and now falling behind Python (4th) on the list. The Python and Ruby camps are pretty happy with their results, and many seem vindicated as the results seem to have only amplified the PHP bashing out there.

Being the contrarian that I am, I could not just take the TIOBE results at face value.  Sure it shows PHP search traffic decreasing relative to the other terms, but what are we actually measuring here.

Are we measuring the installed base? Are we measuring the number of programmers/users?  Are we measuring the number of applications?  The answers are no, no and no.  TIOBE measures search engine traffic, period.  TIOBE’s methodology is limited to the volume of searches for $language . “programming”.  For example, they would have pulled search volume for “Java programming”, “PHP programming”, “Ruby programming” and so on.

To be sure, this approach is consistent across the languages, but there’s a significant amount of measurement error here if our goal is to determine the popularity of each language.

I went to Google Trends to look at search results of PHP against Ruby and Python, and yes indeed there is an alarming drop in PHP search volume going back to 2004 (see below).  However, the Ruby and Python search volume is by comparison nearly off the chart scale except for the blips in the last few months for Ruby.  We’ll have to wait and see if the Ruby spike is a trend or an anomoly, but looking at the historical data we can say the observable trend is zero growth in Ruby or PHP “popularity” as measured by TIOBE’s methodology.

Google Trends_ php, python, ruby

Search volume for PHP, Python and Ruby Since 2004

This observation doesn’t change the alarming drop in PHP search volume, but what good is this metric in a vacuum?  The following chart shows search volume for Java, C++ and PHP respectively.  Notice a trend?

Google Trends_ java, php, c++

Search volume for Java, C++ and PHP since 2004

All three of these languages are experiencing significant drops in search volume since 2004 (that’s as far back as Google Trends goes).  In fact, Java’s decline looks to be twice as bad as PHP’s.  Where are the Java developers jumping out of windows?  Does this mean each of these languages is fatally flawed and on its way out to be replaced by up and comers like Ruby and Python.  Of course not.  There’s a correlation among the drops in these three languages, and I would hypothesize that there’s an external variable that is depressing search volume here.  The alternative explanation is that Java, C++ and PHP are each, by coincidence, experiencing major drops in popularity.  I think that’s a far less likely possibility.

I would also wager that in the case of PHP, the proliferation of frameworks mean fewer people are searching Google for “PHP.” Instead, we are all busy searching for “Cake PHP”, “Symfony” or “Zend Framework”.  Google Trends shows fairly low search volume for these three terms, so this is not an answer, but it could be a small contributing factor.

The real question is what’s going on with search in general?  Is overall search traffic down this much?  Surely not.  Are people getting their programming language knowledge in other ways?

Ultimately I am reassured as a PHP developer that although something is going on out there, its not hitting just us.  Further, PHP is still in the top 5 on the TIOBE index, and its pretty rare company up there with three of the five being older, more established “enterprise” scale/desktop languages.  We’ll have to watch the TIOBE index over the next few months to see if the Python spike is a trend or a blip, so I’m not going to spend a lot of time worrying about it right now.

As technology professionals we can’t be afraid of change, so if there is a death knell sounding for PHP, we have to be able to accept it and move on. Having said that, there’s no bell tolling yet… I just don’t see it.  PHP’s only recently begun to see serious enterprise adoption, and the trend is accelerating, not decelerating.  Even if PHP wasn’t cool anymore it would be a decade before all this enterprise adoption was undone in favor of other platforms.

I’m all ears if you have any explanations, and please try to back up with data if you can find it.

Update: Kevin Schroeder has now weighed in on this as well.

There are 12 comments in this article:

  1. 3/03/2011chris says:

    I dont’t know the tiobe index is really a reliable source to monitor the usage of a language. The other question is do you want to know which is the most used language for websites and web apps or for software of whatever type.

    There are several other sources that indicate that php is doing very well lately:

    Online Employment Report from Elance:


    W3Techs Usage of server-side programming languages for websites report:

  2. 6/03/2011Will says:

    The Tiobe Index has been proved umpteen times to be unreliable.

  3. 7/03/2011Biffy says:

    Also bear in mind that anyone searching for PHP is pretty much guaranteed to be looking for the programming language, whereas the terms “Ruby” and “Python” could mean a LOT of different things, and not neccessarily the programming language.

  4. 12/03/2011mhitza says:

    That’s “symfony”. Also people google now for WordPress, Drupal, etc. The PHP community got itself more niched since 2004.

  5. 12/03/2011Chris Renner says:

    Good catch Mhitza, I didn’t realize I had Symfony spelled wrong. I’ll make the correction :)

    You’re very right, so few people are searching for PHP now in a global sense, specialization in PHP has been huge the past 5 years.

  6. 2/05/2011ben says:

    I don’t take it that way.
    1. Tiobe index is bullshit same for Google trend. It is just search stats and who turn really always on google for search. We are not in 2006, we use social media and I use a lot twitter and wajam to search for information. I use google only if my social network doesn’t give me satisfaction.

    I look at which language is in demand : but
    2. I don,t care if Java is at 25 %, PHP 7.5% , Python 6% or Ruby 2.5% of the open jobs.
    I look where the job market goes.
    What I saw for two years is: (% new jobs) – Java is declining slowly (28% to 25%) , PHP is topping (7.2% to 7,5%), python is thriving (4% to 6%) and Ruby is accelerating (1.5% to 2.5%).

    And if you look at startup Python and Ruby take a huge part of the new jobs. So I would not go to Java or PHP because there is a big base of programmer for their actual good standing but without progression, I would go for Python or Ruby because of their standing is in progression and the number of programmer in those languages is low for the augmentation of use.

  7. 2/08/2011Vladimir Demirev says:

    I find Python to be better investment to learn than PHP.

    It is used in far more areas than PHP, like system scripting (it is installed by default on most Unixes), prototype coding – many frameworks have nice Python bindings, you can easily write your program in Py just for proof of concept…
    For example currently I am trying to write small game for a mobile and the 2D framework already has Python binding…

  8. 7/04/2012Greg says:

    New updated figures would by nice. March 2012 Tiobe shows that Python, Ruby and PHP is going down.

  9. 7/04/2012Chris Renner says:

    The way I read the March 2012 results, Ruby and Python actually declined more than PHP.

  10. 5/06/2012DB Optimizer » Popularity vs Performance vs Productivity says:

    [...] Here is google trends normalized by C programming (with out normalization all trends are down because google trends show hits normalized by all traffic and as general traffic increases verses computer geek searches general computer geek searches trend downwards) [...]

  11. 1/10/2013Kyle Hailey » Popularity vs Productivity vs Performance says:

    […] Here is google trends normalized by C programming (with out normalization all trends are down because google trends show hits normalized by all traffic and as general traffic increases verses computer geek searches general computer geek searches trend downwards) […]

  12. 2/10/2013Chris Renner says:

    Very thorough analysis Kyle, thanks for sharing!

Write a comment: