You’ve probably heard about how the new WordPress Gutenberg editor brings block-based editing to WordPress.
And while blocks have been much of the focus, there’s also another change going on behind the scenes that casual users might not notice – the Gutenberg editor is built on React, not PHP. That change, along with other shifts in web development, might have you wondering, “is PHP dead?”.
So…is it? Should we call the funeral home and start the preparations? Well, first off, it’s important to point out that there’s a big difference between wanting PHP to be dead and PHP actually being dead.
Still looking for that perfect WordPress host?
- Secure like Fort Knox
- Free migrations
- Ultimate speed
- Daily backups
- Google Cloud Platform
People have been calling for the death of PHP for years now (you can find “Is PHP Dead?” posts as far back as 2011). And yet, PHP still persists…
In this post, we’ll dig into the data and show how PHP isn’t close to being dead (even if you really wish it were).
- Is PHP Dead? Only if You Ignore the PHP Usage Statistics
- PHP Is Faster and Better Than Ever, Too
- It’s Easy to Find PHP Developers
- You Don’t Have To Like PHP, But It’s Not Dead
Is PHP Dead? Only if You Ignore the PHP Usage Statistics
Ok, PHP might not be the best or the most modern programming language. But that doesn’t mean it’s dead, and it’s pretty tough to argue with the PHP statistics here…
First off, let’s look at what W3Techs has to say.
According to W3Techs’ data, PHP is used by 78.9% of all websites with a known server-side programming language. So almost 8 out of every 10 websites that you visit on the Internet are using PHP in some way. Which leads us to this fact…
To be fair, that number is declining. In November 2017, W3Techs had PHP as the server-side language for 80.1% of websites. That number dropped to 79.6% in June 2018, and now it’s down to 78.9% when we’re publishing this post in November 2018.
However, you also have to take some of the statistics with a grain of salt. Some of these scanning tools simply look for the
X-Powered-By HTTP header. Some hosting providers, including Kinsta, remove these headers from broadcasting on the server for security purposes. Therefore, the number of sites using PHP could, in fact, be higher.
But when the number is still over 75%, it’s tough to use that decline to pronounce PHP as dead.
These numbers really shouldn’t be surprising if you think about it. First off, WordPress, the most popular content management system in existence, uses PHP. Given that WordPress powers over 32% of all the websites on the Internet, that’s a lot of sites using PHP right there.
But it’s not just WordPress, either. There are tons of other big and small sites built with PHP. For example, MediaWiki, the software behind Wikipedia, is written in PHP. And oh yeah, both Drupal and Joomla use PHP, too.
PHP Is Faster and Better Than Ever, Too
In our tests using WordPress and popular eCommerce plugins like WooCommerce and Easy Digital Downloads, PHP 7.2 was pushing 2-3x the number of requests per second as PHP 5.6.
Better yet, PHP 7 also stacks up favorably against other languages, as well.
Beyond that, PHP 7.X versions also bring new improvements for developers like:
- Combined comparison operator
- Null coalesce operator
- New type hinting
- Anonymous classes
- Nullable types
- Iterable and void returns
- Multi-catch exception handling
- Keys usable in lists
- Trailing commas
- More negative string offsets
- Number operators and malformed numbers
- HTTP/2 server push
Of course, you’ll only notice these improvements if you’re actually using the latest version of PHP. Unfortunately, that’s often not the case.
According to WordPress.org, ~82.6% of WordPress sites are using PHP 7.0 or lower, with 36.9%, the plurality, using PHP 5.6:
PHP versions 7.0 and under no longer receive active support and will lose security support at the end of 2018.
The fact that so many websites are running on a PHP version that’s officially reached its end of life probably doesn’t help PHP’s reputation with developers.
Read this post if you’re still not sure why you need to update your PHP version.
It’s Easy to Find PHP Developers
Because of PHP’s popularity, it’s easy to find PHP developers. And not just PHP developers – but PHP developers with experience.
Kinsta provides an all-in-one hosting solution designed to save you time! Let us handle the nitty-gritty stuff (caching, backups, etc.), and you focus on what you do best, which is growing your business.
More importantly, PHP developers themselves seem to be doing just fine, as this Tweet from Brandon Savage so eloquently points out:
If PHP is dead someone forgot to tell my bank account.
— Brandon Savage (@brandonsavage) October 28, 2018
For newer frameworks, it’s harder to find developers, especially ones with experience.
More importantly, sometimes experience just flat out isn’t possible without a time machine. For a humorous take on it, there’s this Reddit post where a job description wanted a React developer with 5 years of experience back in 2017, at which point React had only been around for ~4 years.
You Don’t Have to Like PHP, But It’s Not Dead
Bjarne Stroustrup, the creator of C++, has a pertinent quote here:
There are only two kinds of languages: the ones people complain about and the ones nobody uses.
Yes, PHP does seem to be losing some steam according to W3Techs’ data. But even if PHP keeps decreasing at the same rate, it would take 25+ years before PHP even dropped under the 50% mark!
In the end, all of these posts about “Is PHP Dead?” are really just examples of Betteridge’s law of headlines – “Any headline that ends in a question mark can be answered by the word no.”
What do you think? Is PHP dead? Do you love PHP? Do you wish you could smother PHP with a pillow? Let us know in the comments!
The post Is PHP Dead? No! At Least Not According to PHP Usage Statistics appeared first on Kinsta Managed WordPress Hosting.