3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = substr("foo",3); if(strlen($foo) == 0){ echo "Run on both PHP 5 and PHP 7\n"; echo gettype($foo); //boolean on PHP 5 and string on PHP 7 }
based on RGY8N

Here you find the average performance (time & memory) of each version. A greyed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0050.00519.23
7.1.70.0040.00417.29
7.1.60.0060.00617.26
7.1.50.0110.01116.77
7.1.40.0170.01034.21
7.1.30.0270.01334.46
7.1.20.0270.01334.45
7.1.10.0030.01016.45
7.1.00.0000.01316.48
7.0.200.0070.00416.49
7.0.180.0100.01016.06
7.0.170.0200.00716.07
7.0.160.0000.01316.06
7.0.150.0000.01316.05
7.0.140.0000.01316.12
7.0.130.0070.01016.35
7.0.120.0000.01316.59
7.0.110.0070.01016.36
7.0.100.0070.01016.23
7.0.90.0030.01016.19
7.0.80.0030.01016.29
7.0.70.0000.01316.10
7.0.60.0030.01316.18
7.0.50.0100.00716.23
7.0.40.0030.01316.45
7.0.30.0070.01016.57
7.0.20.0030.01016.38
7.0.10.0070.00716.30
7.0.00.0070.01016.40
hhvm-3.17.30.0870.21089.22
hhvm-3.15.40.0500.17086.84
hhvm-3.12.140.0830.20396.61
5.6.300.0070.06320.66
5.6.290.0130.05320.72
5.6.280.0130.06720.87
5.6.270.0170.05720.86
5.6.260.0100.07720.96
5.6.250.0070.08720.77
5.6.240.0170.06020.63
5.6.230.0200.05720.68
5.6.220.0230.06320.83
5.6.210.0070.08320.77
5.6.200.0200.07720.76
5.6.190.0230.07320.63
5.6.180.0200.08020.68
5.6.170.0170.05720.63
5.6.160.0100.06720.63
5.6.150.0130.07020.78
5.6.140.0130.07720.63
5.6.130.0070.07020.67
5.6.120.0200.05320.80
5.6.110.0130.06020.91
5.6.100.0130.06320.77
5.6.90.0100.06720.64
5.6.80.0030.06320.29
5.6.70.0100.07020.00
5.6.60.0000.07720.13
5.6.50.0170.05320.17
5.6.40.0170.05020.21
5.6.30.0100.05320.18
5.6.20.0070.07320.14
5.6.10.0100.06020.14
5.6.00.0030.06019.96