3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo '2 + 2 = ' . (((2 + 2) === 4) ? 4 : (((2 + 2) === 5) ? 5 : 'dunno')); // should output "4", right? RIGHT?

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.0030.01416.71
7.2.00.0030.01019.43
7.1.200.0030.01015.86
7.1.100.0040.00417.90
7.1.70.0030.00716.91
7.1.60.0040.01819.46
7.1.50.0240.01234.64
7.1.00.0070.07322.48
7.0.200.0230.00314.63
7.0.140.0070.07322.00
7.0.60.0170.07720.00
7.0.50.0100.05017.81
7.0.40.0170.06720.03
7.0.30.0530.07020.13
7.0.20.0230.05320.08
7.0.10.0230.07020.09
7.0.00.0170.07320.13
5.6.280.0100.06321.09
5.6.210.0100.05720.74
5.6.200.0030.04018.21
5.6.190.0070.08320.75
5.6.180.0200.07720.48
5.6.170.0230.04720.50
5.6.160.0100.09020.44
5.6.150.0130.07018.14
5.6.140.0130.07018.21
5.6.130.0070.05018.08
5.6.120.0000.05320.89
5.6.110.0070.04020.98
5.6.100.0130.08321.12
5.6.90.0070.08721.01
5.6.80.0070.03720.50
5.6.70.4570.04020.39
5.5.350.0100.08720.31
5.5.340.0030.07317.95
5.5.330.0170.07320.47
5.5.320.0300.07720.17
5.5.310.0330.07720.20
5.5.300.0000.08717.98
5.5.290.0030.04017.88
5.5.280.0100.06720.83
5.5.270.0000.06020.96
5.5.260.0070.05320.75
5.5.250.0030.08720.77
5.5.240.0270.07720.06
5.4.450.0700.05719.52
5.4.440.0630.07019.40
5.4.430.0400.05719.44
5.4.420.0600.05319.40
5.4.410.0500.06719.10
5.4.400.0570.05319.19
5.4.390.0730.05019.24
5.4.380.0230.05718.62
5.4.370.0270.05718.68
5.4.360.0330.05718.61
5.4.350.0330.08318.59
5.4.340.0330.05318.69
5.4.320.0080.04312.45
5.4.310.0100.03812.45
5.4.300.0040.03812.45
5.4.290.0080.06212.43
5.4.280.0110.05312.33
5.4.270.0130.05412.33
5.4.260.0140.08612.33
5.4.250.0110.07312.33
5.4.240.0090.06712.33
5.4.230.0090.08212.32
5.4.220.0120.06212.32
5.4.210.0110.06012.32
5.4.200.0070.06212.32
5.4.190.0100.05812.32
5.4.180.0140.08112.32
5.4.170.0080.06012.33
5.4.160.0170.07712.32
5.4.150.0120.06912.32
5.4.140.0150.06212.00
5.4.130.0150.07912.00
5.4.120.0130.07311.95
5.4.110.0210.08311.95
5.4.100.0090.07811.95
5.4.90.0060.07411.95
5.4.80.0240.07411.95
5.4.70.0100.06511.95
5.4.60.0100.07211.95
5.4.50.0100.06311.94
5.4.40.0110.05111.93
5.4.30.0100.05911.93
5.4.20.0160.06511.93
5.4.10.0110.06811.93
5.4.00.0080.05611.42
5.3.290.0050.03912.80
5.3.280.0110.05712.71
5.3.270.0130.07212.73
5.3.260.0130.05912.72
5.3.250.0160.07612.72
5.3.240.0100.05512.72
5.3.230.0050.07112.71
5.3.220.0120.04712.68
5.3.210.0140.05812.68
5.3.200.0060.04312.68
5.3.190.0120.05312.68
5.3.180.0080.05812.68
5.3.170.0130.05112.67
5.3.160.0140.05312.67
5.3.150.0060.05512.68
5.3.140.0090.04112.66
5.3.130.0100.04212.66
5.3.120.0090.03912.66
5.3.110.0100.03612.66
5.3.100.0090.03512.12
5.3.90.0100.03412.08
5.3.80.0070.03612.07
5.3.70.0080.03712.07
5.3.60.0060.03912.06
5.3.50.0080.03912.00
5.3.40.0090.03512.00
5.3.30.0050.03811.94
5.3.20.0100.04611.72
5.3.10.0100.03911.69
5.3.00.0120.04711.67
5.2.170.0140.0389.18
5.2.160.0090.0399.18
5.2.150.0080.0419.18
5.2.140.0070.0469.18
5.2.130.0130.0449.14
5.2.120.0070.0449.14
5.2.110.0090.0379.14
5.2.100.0070.0419.14
5.2.90.0080.0369.13
5.2.80.0080.0339.13
5.2.70.0070.0439.13
5.2.60.0080.0439.08
5.2.50.0060.0479.05
5.2.40.0130.0319.03
5.2.30.0070.0409.01
5.2.20.0050.0408.99
5.2.10.0040.0308.93
5.2.00.0060.0308.79
5.1.60.0030.0328.08
5.1.50.0110.0488.07
5.1.40.0120.0508.05
5.1.30.0120.0428.41
5.1.20.0080.0308.43
5.1.10.0050.0278.15
5.1.00.0030.0298.14
5.0.50.0060.0206.63
5.0.40.0050.0206.48
5.0.30.0030.0396.30
5.0.20.0110.0396.27
5.0.10.0050.0226.24
5.0.00.0040.0326.23
4.4.90.0020.0174.77
4.4.80.0030.0174.75
4.4.70.0060.0134.76
4.4.60.0070.0134.75
4.4.50.0050.0174.77
4.4.40.0030.0274.71
4.4.30.0040.0154.76
4.4.20.0040.0154.84
4.4.10.0030.0174.85
4.4.00.0030.0264.76
4.3.110.0010.0184.67
4.3.100.0040.0174.67
4.3.90.0050.0134.64
4.3.80.0040.0274.59
4.3.70.0050.0154.63
4.3.60.0030.0194.63
4.3.50.0020.0174.63
4.3.40.0030.0254.54
4.3.30.0020.0173.29
4.3.20.0040.0153.27
4.3.10.0040.0143.22
4.3.00.0000.01310.31