PHP 7 Features, Release and Requirements

PHP 7 is the first major version release of the PHP language in over a decade. It leaves behind many deprecated functions, while introducing some modern development standards to strengthen the future of PHP programming. Its potential for speedy performance is much higher than previous versions, often loading more than twice as fast as PHP 5.

PHP 7 New Features

Including all versions, PHP powers over 80% of the internet and is currently the primary language driving WordPress (among other software and websites). PHP 7 comes packaged with a new Zend engine that helps it compete with server technology such as HHVM.

As compiled, PHP 7.0.0 barely increased in size over past versions. However, it remains much leaner than its predecessors when it comes to outdated features. PHP 7 also drops many deprecated functions in favor of modernized features such as type hints and declarations. In addition, PHP 7 offers anonymous classes, the spaceship operator, and throwable errors. While PHP 7 certainly retains its ease of use for new developers, these updates will also be a welcome breath of fresh air for advanced developers.

Perhaps most importantly, PHP 7 outshines previous versions by way of speed, security, and resource efficiency. For starters, it can handle uncached hits at least twice as fast as PHP 5. We’ve also seen firsthand that PHP 7 should bring around a 30-50% improvement in memory consumption.

PHP 7 Hosting for WordPress

WordPress officially recommends that users to run their sites on PHP 7. This is because the WordPress core is always developed to run smoothly on the latest version of PHP.
WordPress continues to encourage all users to run the latest and greatest versions of PHP, including PHP 7 upon its release. – Aaron Jorbin

Of course, as developers themselves, the WordPress team understands that the latest version of any software will attract developmental attention. It means that bugs, security fixes, and feature improvements will primarily be made for PHP 7, as past versions of PHP have ceased to receive significant updates.

For you, this means WordPress updates will be tailored to PHP 7 as it continues to mature and develop. In fact, WordPress’ core has supported PHP 7 fully since its public release in December 2015. Meanwhile, the wider WordPress community is promoting more awareness of PHP 7 by way of third-party blogs, WordCamp talks, and more in order to bring developers and users up to speed.

It’s a benefit for all, because WordPress sites using PHP 7 should load quicker and run more efficiently than those using older versions. Whenever possible, it is best to find WordPress hosting that supports PHP 7 and takes advantage of its features.

Documentation

The official PHP manual is available online in a number of languages. Here, you can find detailed descriptions and examples for most of the PHP functions and classes, with notes on deprecation and updates for PHP 7 and beyond.

If you’d like to keep tabs on any PHP 7 issues related to WordPress, you can do so by following the #php7 tag on the Make WordPress Core blog – although there hasn’t seemingly been an issue in a while. You’ll mostly want to look out for ill-prepared plugins and themes, perhaps contacting developers of any not compatible with PHP 7 to help bolster its usage.

PHP 7 Release

Despite being such a widely used language, PHP hadn’t received a major version update for over a decade. PHP 7 was first announced in August 2014 and was not released until December 2015 – meaning a near 18-month development process.

The odd leap from PHP 5.5 to PHP 7 has a somewhat muddled history. PHP 6 began development in 2010, but was scrapped due to issues involving core Unicode support. There was a huge debate about whether to simply skip PHP 6 and move onto PHP 7, or release PHP 6 as a completely different project than the failed one. Ultimately, PHP 6 was skipped in order to avoid confusion between the failed update and the implemented changes that ended up as PHP 7.

Here at WP Engine, we’re offering PHP 7 support in order to best serve our customers with high speed and resource-efficient performance. It means you can be safe in the knowledge that your version of WordPress is already running on a modern, stable, and speedy platform.

Requirements

WordPress.org offers a general requirements page, where they display the most recent server recommendations, and they’re updated when necessary. We recommend regularly checking in on this page for updates to ensure your sites are configured for optimal compatibility. Alternatively, you’ll want to follow a solid WordPress-specific blog, as they will likely have first-hand information on any developments.

Going forward in your own projects, PHP 7 will require you to remove any deprecated PHP functions from your code before it’s executed properly. You’ll also want to check for updates to existing functions so there isn’t any confusion down the line. A general rule of thumb you can follow is to always keep your servers upgraded to the most recent stable releases of PHP, MySQL/MariaDB, and Apache/Nginx.

Of course, it would be tedious to carry out these checks manually for each of your WordPress sites and projects. This is why we’ve created the PHP Compatibility Checker plugin.

php compatability checker plugin

To get started, simply install and run the plugin to determine whether there are any code elements that need addressing before completing the upgrade to PHP7. It’s simple to use, and there’s a detailed rundown of the installation process, along with what it can and can’t do, on the official WordPress.org Plugin Directory page.

Get started

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.