This graph shows the performance of four versions of PHP (because the
bench.php script that lives in the php source tree didn’t appear until 5.1). The axis up the left is the time it took to run the benchmark script – so a smaller number is better news.
For each run:
- I grabbed PHP source code for the newest version of each of PHP 5.1 through to PHP 5.4 (and then had to do that again 2 weeks later when we released new versions of PHP 5.3 and 5.4)
- Compiled them with their “vanilla” settings – none of these versions has any extensions added or is the PHP version I actually use
- Ran the
bench.phpscript 10 times and collected the data (full table below)
- Averaged the data and put it on the nice google chart
If you’re interested in the raw numbers, this is what I have:
(with thanks to textfixer.com for a CSV->HTML table conversion tool)
So there you have it: PHP 5.4 is measurably faster than the previous versions of PHP 5.3 (but not twice as fast). Time to upgrade?