We’re excited to announce that PHP 8 is now available on all hosting plans! You can take advantage of this by going into the dashboard, selecting your service and going to PHP and clicking change version and select PHP 8.0.

However, before making the change, here are a few major changes in PHP 8 and why you should be weary before making the change to the latest release of PHP.

Should I update my site to PHP 8 now?

Generally, this is something that we would avoid…for now. The main reason is WordPress isn’t officially supported for PHP 8 unless you’re running version 5.6. Even with 5.6, only ‘most’ of the bugs have been ironed out and you still may hit issues.

The biggest concern is not so much the WordPress core, but plugins and themes are unlikely to work flawlessly on this new version of PHP.

So what has changed?

For the most part, there actually hasn’t been a lot of changes in this newest version, as with most versions of PHP, things that were depreciated in PHP 7.4 are now removed and will fatal error. These functions are:

  • The $php_errormsg variable
  • The create_function() function
  • The mbstring.func_overload ini directive
  • The real type
  • The allow_url_include ini directive
  • The restore_include_path() function
  • The each() function

The following PHP extensions are currently unavailable:

  • PHP-PSR
  • Snuffleupagus
  • Phalcon 4
  • ionCube 10
  • Memcache
  • SourceGuardian

There has been some changes on how the runtime of code will not work even when minor errors are present. While we understand the logic, we were hoping that this be more like other coding languages that will still attempt to run with errors. HTML is a perfect example of where even if there are major syntax errors, it will still continue to run as best as it can.

Some other minor changes in the way literal parameters are handled are more strict than previous versions to address the long standing issues of type juggling.

How can I test my website if it will work with PHP 8?

The best way is to copy your site to staging, and push the staging version to PHP 8. That way you can view the site and view any errors you may have. It’s important to ensure you test this with at least version 5.6 of WordPress to get the best chance for success.

Once you’ve confirmed it’s working on PHP 8, you can then switch your production site PHP version.

If you have any further questions on PHP 8 or assistance with our all Australian development team, please reach out to our support and we’d be happy to help.