PHP usage statistics

Every once in awhile I stumble across someone who is trying to find their way and decide what they  will do in their career.  As the organizer of a PHP user group I see many new developers passing through.  Of course I always speak of how strong PHP is in the web markets, and encourage new web developers to pursue PHP as a tool in their box of goodies.  Because as a web developer it would be a career limiting move to not have any knowledge of PHP.  Here is why:

Stats on website technologies

In the link above we can see some enlightening metrics on PHP usage in websites:

  • PHP is used by 79.8% of all websites where the server technology is known.
  • The next closest competitor is ASP.Net at 19.8%.
  • Java is seriously trailing in web at 3.5%.
  • Ruby is hardly represented at 0.5%.

NOTE: A website may use more than one technology, so the numbers are not a perfect 100%.

I was a little shocked to see how high the numbers were when I saw them.  I mean, what about github, and Basecamp, and other sites using alternative technologies?  Well, after more thought I realized that while these popular sites do use non-PHP technologies, they are just single sites.  However when taken into account in the scope of the entire web, they only count as one.

Note on limited career moves

Now don’t take what I am saying totally wrong.  I am not so naive to think a web developers cannot survive without PHP in their toolbox.  I realize there are many developers using alternative technologies who have never touched PHP, and they are able to survive.  I am simply saying that if a web developer really wants to do well they will run into PHP more often than not, and it would be a shame if they were not able to play in that ballpark.

The 20.2% of websites not using PHP is still a very large number.  According to Netcraft there are around 672 million active websites at last estimation.  Which means there are around 139 million websites not running PHP.

PHP Versions

To get a little more fine grain, lets look at what version of PHP is being used:

In that link we see:

  • PHP version 5 is used for 97.1% of all PHP websites.
  • PHP version 4 is used for 2.9%

For those still using PHP 4, it is time to make solid plans to get updated.  It has been almost 9 years since PHP version 5 was released.  That is a very long time, and those old PHP 4 sites and applications need to be updated. (Aim for the current version 5.4)

Now within PHP version 5 there are many sub-versions, so to gain more insight into how this breaks down we look at the following link:


  • PHP 5.2 and 5.3 make up the largest share with 93.2% of the overall
  • PHP 5.3 is 49.6%, which I think should be higher
  • Newer 5.4 is very low at only 4.1%.

I was sad to see version 5.3 was not significantly higher than 5.2, but it kinda makes sense.  Because 5.3 was such a drastic change in the object model introducing namespaces, late static bindings, and closure, many developers feel intimidated to update their servers from 5.2 to 5.3 even though the upgrade would most likely not break anything in their code.

I would encourage anyone running their code on 5.2 to try out 5.3 or 5.4 on a “testing” server, then if all is well plan to migrate in production as well.  Then they can take advantage of more speed and include some of the new technologies that came with 5.3 and 5.4 in their code.

We can clearly see how much PHP rules the web space.  But what about elsewhere?

Overall programming language usage

I thought I would share another stat about programming languages as a whole, regardless of where they are used.

Here we can see PHP still ranks pretty high, and has been holding pretty steady for some time. While PHP rules where it was “intended” to be used (websites), it is versatile enough to still rank high overall.

In closing

So yes, there are many programming languages out there and I encourage all developers to learn as much as they can. But as professionals we cannot possibly learn them all and be good at all of them.  So I say pick one, and learn it very well while still dabbling with others.

There is nothing wrong with building a career around PHP, and it can be quite profitable since PHP is so wide spread.

Above all, live up to the title “Professional Developer” and always strive to learn more. And if you are a web programmer it would be a mistake in your career (in my opinion) not to know the most predominant technology in the space…PHP.

6 responses to “PHP usage statistics”

  1. I would guess that PHP version 5.2 is sticking around because slightly older vsions of Red Hat (pre-version 6, I think) and one of its free decedents (CentOS) do not yet support newer PHP versions with an official package.

    When you have clients or ISO standards requiring the use of official packages you are sometimes unfortunately forced into sticking with older versions for longer than you’d like.

    Anyway, I was surprised by the statistics. I knew PHP was used more than many people expect, but approaching 80% made me do a double-take.

  2. Technology used in websites:
    PHP – 79.8%
    ASP.NET – 19.8%.
    Java – 3.5%.
    Ruby – 0.5%.

    Total: 103.6%

    Strange results.

  3. The technologies adding up to 103.6% is not really strange since sites may use more than a single technology. 😉