PHP 7 – The next big thing for Magento

Stefan Wieczorek —  February 11, 2016 — 1 Comment

PHP 7 - The next big thing for Magento

Our passion at MGT is performance and we love to use the newest and fastest technologies.
Our goal is to get the maximum performance for our customers and to use only resources which are actually needed.

In the last months we very busy to get our new stack ready with Debian 8, PHP 7 and NGINX with http2 support.

Introduction

We and the PHP community were waiting since months that PHP 7 is released. We compiled and tested PHP 7 as it was in beta many months ago and we were really impressed by the performance and memory consumption.

Magento is based on its own framework that is also based on the big Zend Framework 1 which make any request using hundreds of PHP files and thousand lines of code.

Benchmarking Magento 1.9 with PHP 7

I have made some basic benchmarking with PHP 5.6 and PHP 7 on a fresh Magento 1.9.2.3 installation with sample data installed.

For the benchmark i used a c4.xlarge instance type with 4 cores and 7.5 GB RAM. The results are insane.

Benchmarking the Response Time

Magento 1.9 (sample data) with PHP 7

Benchmarking the Memory Consumption

Magento 1.9 (sample data) with PHP 7

Summary

In the benchmarks we see that PHP 7 is more than 50% faster than PHP 5.6 and consumes 4-5 times less memory. This means that you can serve more visitors with the same hardware resources or that you need much less hardware resources for the same amount of visitors.

Is Magento 1 and Magento 2 compatible with PHP 7?

Magento 2 supports PHP 7 out of the box, Magento 1 doesn’t work without patches.

We have developed patches for PHP 7 to give our customers the huge performance improvement which results in much faster page loading times, higher search engine ranking and of course less AWS costs.

Do you run Magento with PHP 7 in production?

Yes, we already have many customers running on PHP 7. All new installations will be shipped with PHP 7.

One response to PHP 7 – The next big thing for Magento

  1. Fantastic numbers. Realy great work :)

Leave a Reply

*