PHP 7 with Magento 2

Steve Hardy / December 19th 2015 / Creative, Technology / 1 comment

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:

php-56-magento2

php-70-magento2

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.

About the Author - Steve Hardy

Steven leads our line-up of Linux & Windows specialists providing DOWO with its secure hosting platforms and 24/7 support team. Having previously worked in the NHS, managing multi-million pound ICT budgets, he has the skills and knowledge to protect highly sensitive information, control access and utilise that data in the most secure and reliable way. These skills have enabled DOWO Digital to develop first class web solutions and his commercial skills have provided us with a stable financial footing.

One Response to “PHP 7 with Magento 2”