PHP 8 Compatibility Check and Performance Tips

Originally published at: https://haydenjames.io/php-8-compatibility-check-and-performance-tips/

PHP 7 was first released back on 03 Dec 2015. Yes, it’s been around a while! The PHP team encouraged upgrading to PHP 7, hailing its improvements such as being twice as fast, consistent 64-bit support, removing old and unsupported SAPIs and extensions, and improved fatal error resistance, to name a few. A few years…

2 Likes

I have heard of sites tanking because of this. I think having a focus on PHP is not something you can afford to skip these days, especially if you rely on traffic for revenue, manage an online service or shop, or generally want your site to be stable, secure, and fast.

Excellent guide! You made it a lot easier to go through than I have read on other sites.

I’ve been using PHP 8 since shortly after it was released. Now I am using PHP 8.2 and it is working just fine with WordPress, although I did have to disable one plugin. It was only a minor inconvenience for some nice speed gains.

1 Like

Nice. I have been working through compatibility issues between 7.4 and 8.*. But it’s primarily sites running Magento/Openmage, Joomla, Drupal, and others. But WordPress has been pretty smooth right up to 8.1. As you also experienced, only some old plugins in some cases.

2 Likes

Agreed.

WordPress has always been very quick when adding support for the latest versions of PHP. I am usually able to upgrade within a month after release. I always spin up a staging site to test larger changes.

What are the main differences between PHP 7 and PHP 8? I have not looked into anything yet but I am going to have to upgrade/update. I am using 7.4 now and have been putting it off because of compatibility issues.