It’s almost been three years since the PHP Community introduced the version 7 of the language. It is also been exciting for the WordPress and BuddyPress community. The new version of PHP promises new features that would solve real-world problems, this includes but not limited to:
1. BuddyPress Speed!
Base on our experience upgrading from PHP 5.6 to PHP 7.2 alone has dramatically increased our page loading times probably by 50% to 150%. The increase in speed will significantly impact your SEO as site speed is one of the factors that determine the rank of your website. It can also make your community site more engaging and fun to use.
The increase in speed will not only be beneficial to you but your users as well. You will be navigating your WordPress Admin, making changes faster than ever and your users will enjoy the snappy user experience.
We have made a very simple benchmark with PHP 5.6 vs. PHP 7.2 to show the difference in speed. We have installed and activated a fresh version of WordPress using TwentySeventeen as the Theme with only two plugins active which are PHP/MySQL CPU Performance Statistics, which we will be using as our benchmark tool to measure the difference of speed and of course, BuddyPress.
First, using PHP 5.6, we did a PHP Test Only, and it shows the following result:
Doing the math test, string manipulation test, loop test, conditional test, and other PHP test shows 4.38 seconds of execution. Not bad at all.
And then, we switch the version of the PHP from 5.6 to 7.2 and here are the results:
A staggering 2.2 seconds. As you can see, PHP 7 defeats PHP 5.6 in every aspect. That is almost a hundred percent increase in speed by just changing the PHP version alone. Imagine how this could benefit your website.
You can also do your benchmark by using the plugin mentioned above.
2. BuddyPress Security
Another critical factor to consider when running a community site is the security. If you are running PHP 5.6 right now, then you need to know that PHP 5.6 only gets security updates support until December 2018. Yes, you hear that right.
If you go to this page, you will see the different versions of PHP with its corresponding Branch, Initial Release, and Security Support Until. Base on this page it says that PHP version 5.6* will only be supported until December of this year. That means that all of the security enhancement will not be anymore applied to the release and will only be applied to version 7 and above.
If you are still using PHP version 5.5 or PHP 5.4, then I strongly suggest you contact your hosting provider and make them update your PHP version to 7. You deserve all of those important security updates.
If the above statements don’t change your mind, then try looking into WordPress requirements itself.
WordPress recommends PHP 7.2 or higher.
From WordPress Requirements Page:
Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.
Alright! Hope you upgrade your server!
3. Better Features
Another notable change within the PHP is the introduction of new features such as Anonymous Classes, Accurate Type Declarations, Spaceship Operator, Null Coalescing Operators, 64-Bit Windows Support, Better Error Handling, brand new Zend Engine, and more.
I can write an entirely new article about, but for the brevity, I would like to talk about how your site can benefit from those new features instead.
Developers who wrote the plugins installed in your website will now have a better facility in making sure that the plugin performs its job well.
In the world of Web Development, particularly in WordPress. It is always important to choose the latest stable release of the software, may it be a Theme or a Plugin.
Things change so fast that a noble idea today might become obsolete in the next two years. So it is always recommended to stay on the latest version.
Let me know in the comment below how PHP 7 improved your BuddyPress community site!