3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach([true, 1, '1', 'a', [1], (object)[]] as $val) echo var_export($val, true) . ' == true is ' . ($val == true ? 'true' : 'false') . PHP_EOL;

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.2.60.2700.00914.86
7.2.50.2420.01014.75
7.2.40.2820.01215.37
7.2.30.2160.00615.34
7.2.20.2610.01215.34
7.2.10.2790.00915.34
7.2.00.2390.00915.40
7.1.200.0100.00315.70
7.1.170.2060.00813.93
7.1.160.2380.00916.68
7.1.150.2440.01216.86
7.1.140.2280.01116.58
7.1.130.3390.01316.88
7.1.120.3110.01016.82
7.1.110.2010.01116.30
7.1.100.2240.00815.86
7.1.90.3050.01616.04
7.1.80.2520.00915.93
7.1.70.1650.01115.09
7.1.60.1710.00932.87
7.1.50.2280.01732.79
7.1.40.1680.01832.62
7.1.30.1690.01432.68
7.1.20.1960.02032.89
7.1.10.1390.01314.69
7.1.00.1160.01014.64
7.0.300.2730.00813.44
7.0.290.1900.01216.46
7.0.270.3000.01116.26
7.0.260.2930.01316.42
7.0.250.2550.01115.79
7.0.240.2280.01215.91
7.0.230.3050.01415.86
7.0.220.1920.00615.94
7.0.210.2510.01114.89
7.0.200.2240.00814.62
7.0.190.1880.01014.77
7.0.180.1640.01314.30
7.0.170.1540.01014.25
7.0.160.1610.01214.51
7.0.150.1330.00814.27
7.0.140.0990.00814.56
7.0.130.1270.01114.76
7.0.120.1460.01414.48
7.0.110.1400.00914.29
7.0.100.1500.01114.16
7.0.90.1240.01114.43
7.0.80.1300.01414.35
7.0.70.1180.01114.16
7.0.60.1510.01014.34
7.0.50.1240.01014.36
7.0.40.1130.01214.56
7.0.30.1290.01414.63
7.0.20.0980.00914.41
7.0.10.1570.01114.50
7.0.00.0880.00814.66
hhvm-3.22.00.1200.25590.60
hhvm-3.21.30.0920.22190.51
hhvm-3.21.00.1410.21490.09
hhvm-3.20.20.1720.25790.47
hhvm-3.19.20.1460.27089.28
hhvm-3.18.50.0990.21588.11
hhvm-3.18.40.1720.28187.87
hhvm-3.17.30.1380.22087.63
hhvm-3.15.40.1190.17785.19
hhvm-3.13.20.1470.21496.62
hhvm-3.12.140.1290.20795.47
hhvm-3.11.10.1590.25187.29
hhvm-3.10.10.1230.23784.35
5.6.300.0140.06020.79
5.6.290.0180.06520.78
5.6.280.0230.07220.76
5.6.270.0230.06120.86
5.6.260.0220.06820.79
5.6.250.0180.06120.71
5.6.240.0140.07220.72
5.6.230.0190.06120.92
5.6.220.0240.06220.91
5.6.210.0240.07720.54
5.6.200.0260.07120.87
5.6.190.0230.07520.71
5.6.180.0190.07720.72
5.6.170.0190.06320.74
5.6.160.0270.06420.92
5.6.150.0160.06520.70
5.6.140.0200.06320.96
5.6.130.0210.07920.87
5.6.120.0190.05820.80
5.6.110.0230.06720.86
5.6.100.0200.08220.73
5.6.90.0150.07320.66
5.6.80.0170.07020.10
5.6.70.0200.06220.05
5.6.60.0160.05920.27
5.6.50.0250.07120.19
5.6.40.0220.05820.32
5.6.30.0260.07120.25
5.6.20.0210.05920.32
5.6.10.0220.06320.21
5.6.00.0260.07120.20
5.5.380.0210.06517.55
5.5.370.0190.07717.52
5.5.360.0170.08217.39
5.5.350.0160.07317.38
5.5.340.0170.06817.80
5.5.330.0220.06517.94
5.5.320.0130.07217.88
5.5.310.0160.07417.88
5.5.300.0230.06817.79
5.5.290.0230.07617.97
5.5.280.0160.05617.90
5.5.270.0180.05717.87
5.5.260.0160.05917.84
5.5.250.0150.05817.77
5.5.240.0150.05517.32
5.5.230.0170.06017.25
5.5.220.0160.05917.34
5.5.210.0210.06117.44
5.5.200.0230.06717.24
5.5.190.0280.06117.23
5.5.180.0240.06417.41
5.5.160.0190.06217.35
5.5.150.0190.06317.12
5.5.140.0170.05317.30
5.5.130.0190.06117.23
5.5.120.0180.05617.28
5.5.110.0190.06817.41
5.5.100.0250.06017.24
5.5.90.0160.06517.18
5.5.80.0140.07117.20
5.5.70.0180.05917.17
5.5.60.0150.06717.13
5.5.50.0200.06716.98
5.5.40.0160.05016.98
5.5.30.0150.06617.20
5.5.20.0210.07316.98
5.5.10.0200.06917.11
5.5.00.0150.05717.11
5.4.450.0200.06019.24
5.4.440.0180.05619.31
5.4.430.0210.05719.30
5.4.420.0120.05719.20
5.4.410.0160.05319.20
5.4.400.0160.05319.01
5.4.390.0180.07218.99
5.4.380.0140.05819.16
5.4.370.0210.06219.17
5.4.360.0240.06819.01
5.4.350.0140.05718.91
5.4.340.0150.06018.79
5.4.320.0280.06018.91
5.4.310.0150.05718.99
5.4.300.0200.06618.91
5.4.290.0220.06518.94
5.4.280.0170.05919.07
5.4.270.0200.06519.16
5.4.260.0190.06718.97
5.4.250.0180.05518.93
5.4.240.0210.06718.99
5.4.230.0250.05718.95
5.4.220.0230.07118.96
5.4.210.0240.06618.97
5.4.200.0230.05218.76
5.4.190.0230.05318.84
5.4.180.0250.07018.97
5.4.170.0160.06918.93
5.4.160.0150.05718.96
5.4.150.0240.07018.98
5.4.140.0200.06216.54
5.4.130.0120.07216.55
5.4.120.0190.04616.47
5.4.110.0140.05516.52
5.4.100.0180.06216.40
5.4.90.0210.06816.61
5.4.80.0150.05016.55
5.4.70.0200.06716.33
5.4.60.0140.06816.54
5.4.50.0130.06416.56
5.4.40.0190.05016.59
5.4.30.0140.05116.31
5.4.20.0110.05316.41
5.4.10.0100.05816.48
5.4.00.0160.04915.98
5.3.290.0200.05014.81
5.3.280.0180.07214.58
5.3.270.0170.07514.70
5.3.260.0220.06014.70
5.3.250.0180.06614.60
5.3.240.0140.06914.54
5.3.230.0140.06614.55
5.3.220.0190.06214.50
5.3.210.0140.06214.56
5.3.200.0180.05814.55
5.3.190.0210.06514.55
5.3.180.0210.06014.69
5.3.170.0150.06414.50
5.3.160.0140.06814.55
5.3.150.0160.05414.70
5.3.140.0190.06714.48
5.3.130.0110.07314.48
5.3.120.0120.06414.72
5.3.110.0120.05614.71
5.3.100.0120.06214.13
5.3.90.0200.05914.21
5.3.80.0130.04614.05
5.3.70.0140.05214.09
5.3.60.0150.04913.98
5.3.50.0190.06013.88
5.3.40.0140.05613.93
5.3.30.0150.06713.98
5.3.20.0150.06913.76
5.3.10.0120.07013.60
5.3.00.0150.05113.62
5.2.170.0130.06211.09
5.2.160.0180.04811.07
5.2.150.0160.04211.36
5.2.140.0160.05011.26
5.2.130.0140.05011.25
5.2.120.0160.05311.09
5.2.110.0160.04411.25
5.2.100.0080.04411.25
5.2.90.0130.03811.21
5.2.80.0130.05111.19
5.2.70.0110.04111.08
5.2.60.0100.04111.26
5.2.50.0130.04010.94
5.2.40.0130.04610.80
5.2.30.0170.03710.89
5.2.20.0170.03911.01
5.2.10.0120.05111.12
5.2.00.0130.04910.94
5.1.60.0120.0419.87
5.1.50.0110.04210.13
5.1.40.0110.0499.85
5.1.30.0110.04210.32
5.1.20.0090.04210.31
5.1.10.0150.04010.27
5.1.00.0130.04810.20
5.0.50.0110.0338.63
5.0.40.0060.0368.43
5.0.30.0100.0398.26
5.0.20.0080.0378.49
5.0.10.0080.0388.36
5.0.00.0080.0528.14
4.4.90.0090.0287.47
4.4.80.0100.0227.47
4.4.70.0080.0247.47
4.4.60.0080.0227.47
4.4.50.0050.0237.47
4.4.40.0050.0467.47
4.4.30.0090.0227.47
4.4.20.0120.0227.47
4.4.10.0110.0287.47
4.4.00.0080.0347.47
4.3.110.0060.0227.47
4.3.100.0050.0337.47
4.3.90.0100.0327.47
4.3.80.0090.0367.47
4.3.70.0070.0217.47
4.3.60.0070.0287.47
4.3.50.0100.0267.47
4.3.40.0100.0407.47
4.3.30.0050.0297.47
4.3.20.0060.0217.47
4.3.10.0050.0217.47
4.3.00.0030.0237.47