3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = 'ABC123'; switch (false) { case isset($var): throw new Exception("Not set!"); case $var: throw new Exception("False!"); case isstring($var): throw new Exception("Not a string!"); case default: echo "All checks passed"!; }

Here you find the average performance (time & memory) of each version. A grayed 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.1.70.0170.00914.92
7.1.60.0230.01233.11
7.1.50.0200.01332.89
7.1.40.0230.01032.48
7.1.30.0230.01032.51
7.1.20.0260.01032.56
7.1.10.0170.00714.66
7.1.00.0150.00714.34
7.0.200.0180.00314.64
7.0.190.0190.00314.41
7.0.180.0140.00714.26
7.0.170.0100.01314.00
7.0.160.0140.01014.14
7.0.150.0110.01114.15
7.0.140.0220.00314.22
7.0.130.1240.00714.38
7.0.120.0110.01114.69
7.0.110.0170.00614.50
7.0.100.0120.01214.49
7.0.90.0110.01114.34
7.0.80.0090.01214.46
7.0.70.0130.01014.45
7.0.60.0220.00314.19
7.0.50.0200.00414.31
7.0.40.0140.01014.25
7.0.30.0170.00614.56
7.0.20.0240.00014.38
7.0.10.0220.00414.32
7.0.00.0180.00314.49
hhvm-3.15.40.0270.14385.77
5.6.300.0100.05320.59
5.6.290.0180.05620.76
5.6.280.0210.04220.75
5.6.270.0130.06620.92
5.6.260.0140.05120.76
5.6.250.0030.06120.91
5.6.240.0180.04920.68
5.6.230.0140.05220.90
5.6.220.0130.05420.83
5.6.210.0170.05020.82
5.6.200.0160.05220.72
5.6.190.0030.06320.81
5.6.180.0060.06120.90
5.6.170.0190.04520.71
5.6.160.0130.06020.87
5.6.150.0130.05320.94
5.6.140.0140.05220.86
5.6.130.0200.04320.84
5.6.120.0200.04620.71
5.6.110.0000.06520.66
5.6.100.0100.05820.86
5.6.90.0030.06020.70
5.6.80.0090.05120.13
5.6.70.0070.05420.09
5.6.60.0160.05220.24
5.6.50.0100.05020.10
5.6.40.0130.04820.09
5.6.30.0070.05620.07
5.6.20.0130.05320.21
5.6.10.0100.05020.07
5.6.00.0140.04920.02