In this experiment, I tested the execution time of the script Zend\bench.php available in the PHP socurce code. I tested the latest PHP versions available, as follows:
- PHP 7.1.32
- PHP 7.2.22
- PHP 7.3.9
- PHP 7.4RC1
I executed the experiment using an Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz, with 32GB RAM, HD SSD running Linux Ubuntu 18.04.3 LTS.
Here the results (in seconds) for each PHP versions:
$ php Zend/bench.php
simple 0.026
simplecall 0.006
simpleucall 0.018
simpleudcall 0.019
mandel 0.069
mandel2 0.069
ackermann(7) 0.019
ary(50000) 0.005
ary2(50000) 0.003
ary3(2000) 0.041
fibo(30) 0.063
hash1(50000) 0.012
hash2(500) 0.007
heapsort(20000) 0.024
matrix(20) 0.020
nestedloop(12) 0.037
sieve(30) 0.013
strcat(200000) 0.003
------------------------
Total 0.455
$ php Zend/bench.php
simple 0.020
simplecall 0.006
simpleucall 0.016
simpleudcall 0.016
mandel 0.100
mandel2 0.074
ackermann(7) 0.014
ary(50000) 0.004
ary2(50000) 0.003
ary3(2000) 0.035
fibo(30) 0.050
hash1(50000) 0.008
hash2(500) 0.006
heapsort(20000) 0.020
matrix(20) 0.019
nestedloop(12) 0.032
sieve(30) 0.011
strcat(200000) 0.003
------------------------
Total 0.437
$ php Zend/bench.php
simple 0.018
simplecall 0.006
simpleucall 0.012
simpleudcall 0.014
mandel 0.075
mandel2 0.068
ackermann(7) 0.012
ary(50000) 0.004
ary2(50000) 0.003
ary3(2000) 0.029
fibo(30) 0.043
hash1(50000) 0.008
hash2(500) 0.005
heapsort(20000) 0.019
matrix(20) 0.016
nestedloop(12) 0.029
sieve(30) 0.010
strcat(200000) 0.003
------------------------
Total 0.373
$ php Zend/bench.php
simple 0.013
simplecall 0.005
simpleucall 0.013
simpleudcall 0.013
mandel 0.053
mandel2 0.061
ackermann(7) 0.012
ary(50000) 0.004
ary2(50000) 0.005
ary3(2000) 0.028
fibo(30) 0.043
hash1(50000) 0.007
hash2(500) 0.005
heapsort(20000) 0.016
matrix(20) 0.016
nestedloop(12) 0.025
sieve(30) 0.010
strcat(200000) 0.003
------------------------
Total 0.334