fbpx

PHP 7 with Magento 2

Here at DOWO Digital we have been migrating a number of websites over onto PHP 7 (have a look at our article on PHP 7 with OpCache), and decided to do some testing with Magento 2.

Why Magento 2?

Magento is our eCommerce solution of choice, and we have a number of developers who regularly work with the solution. We’ll be posting an article in the new year about the benefits of Magento 2, but in a nutshell they are:

  • More Flexible Architecture
  • Improved Customer Experience
  • Better Payment Gateway Integration
  • Improved Productivity
  • Improved Scalability & Performance

Any by adding PHP 7 into the mix, we thought we could introduce further performance increases too – so we put it to the test. It’s worth noting that, at the moment, Magento 1.9 isn’t officially compatible with PHP 7, but there are patches available to resolve this.

However, the performance is not the only advantage of moving to PHP 7. There are also other new features, such as:

  • improved input type hints
  • return type declarations
  • the null coalesce operator.

They really play an essential part in preventing a class of bugs and security gaps, and also they make code more self-documenting. So to put it all to the test we completed 2 x Magento installations, populated with the default sample data – one running on PHP 5.6, and the other on PHP 7.0. We completed the same test tasks and steps on both environments, and look at the results:

In conclusion, we can see that PHP 7 provides substantial performance enhancements, and we’d recommend anyone installing Magento 2 to start with PHP 7 as standard. If you have any questions regarding the latest PHP version or Magento, please speak to our Support Team.