80% of the web powered by PHP

Today, PHP is used by more than 80% of all the websites whose server-side programming language we know. Popular websites such as Slack, Etsy, Cloudflare, Tesla, Wikipedia, WordPress.com, Tumblr and this website are all powered by PHP. With such a large share of the web, it may or may not surprise you that more than 90% 88% [updated 15th Dec 2017] of PHP based websites are still using PHP 5. Of that 90%, less than one quarter are running the latest supported version of PHP 5 (PHP 5.6). In addition, even though PHP 7 was released more than a year ago and although it’s well documented/benchmarked as being up to 2x faster than PHP 5.6, only around 3% of PHP based websites currently use PHP 7.

The PHP 7 install rate seems a bit better among Linux admins according to this poll:

PHP version poll

Last week I wrote a short article “Optimize PHP with finely tuned IT resources and settings” which highlights how to identify bottlenecks which affect PHP powered apps and a few easy PHP optimization tips. Lastly, a healthy discussion covering all sides of this issue can be read here. Remember, avoid the trap of delaying the inevitable, PHP 5 will in time lose support and become more of a pain to maintain.

Tags: , ,

80% of the web powered by PHP

21 Responses

  1. The avoided php7 because the new MongoDB driver would require a complete refactor of my code. It’s a shame they had to change it so much.

    inorganik February 17, 2017 at 6:38 pm #
  2. True. Thanks! @chuckwoodraska:disqus Also see: https://builtwith.com/reddit.com
    Or install https://chrome.google.com/webstore/detail/builtwith-technology-prof/dapjbgnjinbpoindlpdmhochffioedbn Chrome extension and visit with browser.

    Hayden James February 17, 2017 at 7:15 pm #
    • Builtwith only provides a general guess based on hints from the HTML source and HTTP headers. Reddit was built with Python from the ground up: https://github.com/reddit/reddit

      Lance Pioch February 17, 2017 at 8:05 pm #
    • Corrected above. Yes, as per previous comment this is true. I replaced Reddit above with wordpress.com and Tumblr (https://engineering.tumblr.com/post/152998126990/php-7-at-tumblr). Cloudflare/browser cache TTL will catch up soon and reflect the change in the post. When writing the article I wanted to add some popular websites using PHP and used Builtwith, which as correctly noted isn’t most accurate. Thanks again!

      Hayden James February 17, 2017 at 9:07 pm #
  3. The Facebook one is slightly misleading. While, yes, they do use php, Facebook uses a custom compiler for php which turns it into C++. So it is, but isn’t using php. At the very least, it isn’t running STANDARD php.

    Lord Bing Shipley June 28, 2017 at 5:44 am #
    • No longer, they use Hack on top of HHVM nowadays. HHVM is JIT compiled instead of turning it to C++ and compile natively. It’s missing PHP ability to be intermixed with HTML (you won’t do that anyway these days), but otherwise compatible with standard PHP.

      Mario Ray Mahardhika January 6, 2018 at 9:01 pm #
  4. Also add mailchimp: https://blog.mailchimp.com/ewww-you-use-php/

    Hayden James June 29, 2017 at 2:13 pm #
  5. This is certainly true and relevant when comparing PHP to PHP, but if performance and security are of any concern, why use PHP at all? IMO, Go is a much better designed language and the distinction is clearer every release.

    NexWebSites.com November 20, 2017 at 9:48 am #
    • Because PHP works! It’s proven, reliable, well supported among a slew of other reasons. A good read is:

      Hayden James November 20, 2017 at 1:45 pm #
    • PHP is proven. Proven to work poorly and insecurely : https://www.cvedetails.com/vulnerability-list/vendor_id-74/product_id-128/PHP-PHP.html MS-DOS works, but is that the tool you want to use?

      NexWebSites.com November 20, 2017 at 2:00 pm #
    • Get the word out then, as not only does PHP still power most of the web, but also many of the well-known websites. MS-DOS died 15+ years ago, PHP has more installs than ever. We could go back and forth all day. (would be pointless) I’ve not argued whether PHP is or isn’t better than or anything of that sort. Simply that it works for the majority and I guess that’s why its hard to get rid of. Kinda like Compact Disks (CDs), or my analog watch which lacks all the features, battery life/efficiency but it tells time and… just works. Plus, has improved x3 in efficiency in just the last few years.

      Hayden James November 20, 2017 at 2:12 pm #
    • A language is only as bad as the developer using it. PHP can be written to be fast and secure it all depends on the developer

      Alex December 15, 2017 at 2:51 pm #
    • I hear you Hayden. A good quality watch is a good watch. Truth be told, I’d kind of like to keep Go a secret because it makes all of our client’s applications perform so much better than their competition. Unfortunately, I think the word is already out, https://github.com/golang/go/wiki/GoUsers is a short list of companies already using Go.

      That being said, I just absolutely love using Go. Been programming for more than 30 years, from Assembly, C, C++, Java, C#, Ruby, Node.js, Python and yes, PHP. Go has made me love programming again.

      NexWebSites.com November 20, 2017 at 2:25 pm #
    • True. At least there are choices yes. That’s a good thing for sure.

      BTW the graph you included is from this article: https://www.toptal.com/back-end/server-side-io-performance-node-php-java-go

      …as per the most up-voted user comment on that page, the benchmark uses PHP v5.4.16 which is at least 2 to 3 times slower than PHP 7! lol More like 5x to 6x slower since opcache is now enabled by default on PHP 5.5+. So that above graph is basically crap. Sad to say. The article was written in 2017 so its no accident the writer choose a version of PHP just before 5.5 that’s around 3x slower than PHP 7 but at least 5x slower without default opcache.

      It’s not even a supported version of php: http://php.net/supported-versions.php

      See full user comment here: http://disq.us/p/1ikvs8t

      Hayden James November 20, 2017 at 2:35 pm #
    • I don’t doubt it. Still, PHP 7.x isn’t even the same universe as far as performance concerned. This benchmark is using PHP 7.1 https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=php

      Though, you have a valid point about upgrading from PHP 5, if that’s all you have to work with.

      NexWebSites.com November 20, 2017 at 2:44 pm #
    • Look at the footer:
      “PHP 7.1.11 (cli) (built: Nov 16 2017 15:22:17) ( NTS )
      Copyright (c) 1997-2017 The PHP Group
      Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies”

      …again opcache not enabled (its now enabled by default so was it disabled?). Trust benchmarks you run yourself, even then you have to be honest enough to ensure everything is setup fairly.

      With opcache that benchmark would be a lot better esp response times:

      Hayden James November 20, 2017 at 2:50 pm #
    • Drupal 8 is a direct competitor to Oracle in the enterprise market. Not only is drupal of the most secure web apps in the game right now, it’s the chosen web option for the whitehouse.gov, tesla.com, Weather.com, NBA.com, mass.gov, Australian government ect, list goes on. PHP baby.

      Chris Jeraco December 16, 2017 at 4:44 am #
    • Thanks for this! I was not aware of some of these.

      Hayden James December 19, 2017 at 12:28 pm #
    • Because the moment you put a database behind Go, Node, Java and PHP, they all become just as slow.


      Go is great if your planning on running message query service that does not touch a database or disk. And then you hear stories about going from PHP to Go saved x company 30 servers.

      But that is very logical as PHP need to bootstrap on each request. So unless you use a extension like Swoole to bootstrap PHP into memory, it will always be slower thanks to that process. But the moment you run a real website that needs to perform multiple queries to a db, … Go and other there performance drops because they need to wait for a response and PHP its bootstrap process make no difference anymore.

      And security … i can give you a senior programmer PHP program vs a mediocre Go programmer. What do you think will be more secure? Most of the security depends on the developer skills and experience, not the language.

      Benjiro March 8, 2018 at 2:04 pm #

Leave a Reply