Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PHP 5.6 Benchmarks

DZone's Guide to

PHP 5.6 Benchmarks

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

A while ago I did some benchmarks on how different versions of PHP perform in comparison to one another. This isn't a performance measure in absolute terms, this was just benchmarking them all on the same laptop while it wasn't doing anything else, and averaging the time it took to run the benchmark script.

Recently I ran it again for versions PHP 5.3 through PHP 5.6 and I thought I'd share my results:

PHP's performance has consistently improved over the versions; here I don't show versions earlier than PHP 5.3 but that version was also much faster than earlier releases of PHP 5. I meet many applications whose PHP platform aren't upgraded because they don't need the new features in the new versions. This is absolutely fine, but what application wouldn't benefit from improved performance and security?

The individual numbers, if you should want them:

version run 1 run 2 run 3 run 4 run 5 run 6 run 7 run 8 run 9 run 10 average
5.3.28 4.141 3.916 3.365 4.355 3.302 3.513 3.53 4.585 3.653 4.786 3.9146
5.4.27 2.791 2.44 2.943 2.486 2.511 2.617 2.456 2.649 3.01 3.332 2.7235
5.5.11 2.228 2.615 2.346 2.851 2.504 2.475 2.489 2.606 3.429 3.313 2.6856
5.6.0beta2 2.057 2.202 2.149 2.233 2.228 2.247 2.641 2.572 2.283 2.958 2.357

I'm hearing some very convincing rumours about big performance improvements on the horizon for future versions PHP, and that is fantastic, but even the currently-released (or almost - 5.6 will be stable in the coming months) versions have a lot to offer PHP developers everywhere. If any paid-for platform offered this kind of improvement for free, it would be big news. Maybe we should start to shout about some of the good news in PHP too?

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}