Test of PHP 7 Performances

PHP might not be hugely popular these days, but it’s a fundamental part of the tools I use everyday to manage localization of web parts at Mozilla (e.g. mozilla.org).

Today I’ve decided to give PHP 7 a try on my local virtual machine: it’s a pretty light VM running Debian 8 (2 GB ram, 2 cores), hosted on a Mac with VMWare Fusion. Web pages are served by Apache and mod_php, not by PHP’s internal web server, and there’s no optimization of any kind on the config.

Since I and my colleague Pascal spent quite a bit of time improving code quality and performances in our tools during the last year or so, I already had a script to collect some performance data. I ran the test against Langchecker, which is the tool providing data to our Webdashboard.

Existing version: PHP 5.6.14-0+deb8u1
New version: PHP 7.0.0-5~dotdeb+8.1

Time needed to generate the page

TimeMemory consumption

MemoryWhile the number of runs was pretty small (50 for each request), I got decently consistent results for memory and time. And the results speak clearly about the performance improvements in PHP 7.

I don’t personally consider PHP 7 ready for a production environment but, if you can, it’s definitely worth a try. In our case the code didn’t need any change.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *