3v4l.org

run code in 200+ php & hhvm versions
<?php $var1 = str_repeat(" ", 4); $var2 = str_repeat(" ", 4); $var1[0] = $var2[0] = "1"; $var1[1] = "2"; $var2[1] = "3"; $var1[2] = $var2[2] = "4"; $var1[3] = $var2[3] = "5"; echo 'Var1: ' . $var1 . ', Var2: ' . $var2;

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.00.0040.00719.51
7.1.100.0090.01317.98
7.1.70.0060.01217.20
7.1.60.0030.02019.40
7.1.50.0130.00916.79
7.1.00.0000.06322.43
7.0.200.0000.00716.72
7.0.140.0030.07322.01
7.0.120.0070.07022.04
7.0.60.0070.04019.96
7.0.50.0130.04717.89
7.0.40.0070.05020.05
7.0.30.0270.06720.21
7.0.20.0330.07020.16
7.0.10.0030.05720.21
7.0.00.0030.04020.01
5.6.280.0000.07721.02
5.6.210.0100.05320.50
5.6.200.0030.04318.24
5.6.190.0000.05020.43
5.6.180.0400.07020.43
5.6.170.0200.04320.40
5.6.160.0100.08020.51
5.6.150.0170.06318.21
5.6.140.0100.07018.13
5.6.130.0100.07318.18
5.6.120.0100.08321.03
5.6.110.0100.05720.98
5.6.100.0130.08021.00
5.6.90.0070.08321.07
5.6.80.0070.08320.39
5.5.350.4330.03720.42
5.5.340.0100.05317.95
5.5.330.0070.07020.21
5.5.320.0070.05020.18
5.5.310.0270.03720.28
5.5.300.0070.06717.88
5.5.290.0170.07318.07
5.5.280.0130.07320.84
5.5.270.0030.04320.84
5.5.260.0200.06320.74
5.5.250.0100.07720.64
5.5.240.0270.05720.36
5.4.450.4330.04019.41
5.4.440.3430.03719.57
5.4.430.3400.04019.54
5.4.420.3900.04019.48
5.4.410.4270.04319.00
5.4.400.3630.03719.09
5.4.390.4300.03718.88
5.4.380.4700.04318.81
5.4.370.4330.03718.90
5.4.360.4370.03018.91
5.4.350.3730.03719.25
5.4.340.0570.03718.79
5.4.320.4370.03319.09
5.4.310.3500.03319.13
5.4.300.3670.03318.88
5.4.290.3470.02719.13
5.4.280.4270.04019.15
5.4.270.3670.03719.25
5.4.260.3400.04019.13
5.4.250.3570.03018.87
5.4.240.3530.04019.15
5.4.230.2470.03719.16
5.4.220.3470.03718.89
5.4.210.3270.03719.15
5.4.200.3570.03318.91
5.4.190.3270.03318.77
5.4.180.3300.04018.78
5.4.170.1800.03319.15
5.4.160.1400.03319.02
5.4.150.2230.04019.11
5.4.140.2830.03316.16
5.4.130.2470.04016.27
5.4.120.2630.03316.18
5.4.110.3670.03716.43
5.4.100.3270.04016.20
5.4.90.3500.04016.06
5.4.80.3400.03316.41
5.4.70.3430.03316.37
5.4.60.3100.03316.37
5.4.50.3570.02716.43
5.4.40.3100.03716.38
5.4.30.3200.02716.36
5.4.20.3300.03716.41
5.4.10.0300.03716.46
5.4.00.0330.03015.73
5.3.290.4130.03314.61
5.3.280.0000.05714.62
5.3.270.0870.04014.65
5.3.260.1870.03714.69
5.3.250.3070.03314.45
5.3.240.2530.03314.59
5.3.230.3330.04014.59
5.3.220.3370.04014.52
5.3.210.3430.03014.42
5.3.200.3430.03714.59
5.3.190.3400.04014.54
5.3.180.3430.03714.44
5.3.170.3370.04014.55
5.3.160.2770.04014.49
5.3.150.3200.04014.59
5.3.140.3430.04014.39
5.3.130.3470.04014.40
5.3.120.3230.03314.48
5.3.110.1830.04014.63
5.3.100.0270.04313.98
5.3.90.0500.03013.94
5.3.80.0470.03313.87
5.3.70.0400.03314.05
5.3.60.0300.04313.84
5.3.50.0400.03713.79
5.3.40.0430.03313.93
5.3.30.0600.04713.96
5.3.20.0330.04313.63
5.3.10.0500.04313.45
5.3.00.0470.04013.61
5.2.170.0330.03711.24
5.2.160.0270.03311.30
5.2.150.0370.03010.99
5.2.140.0430.03010.99
5.2.130.0270.05311.04
5.2.120.0500.05310.96
5.2.110.0530.04711.10
5.2.100.0430.03011.04
5.2.90.0400.05711.15
5.2.80.0470.04311.00
5.2.70.0530.05011.03
5.2.60.0500.05310.90
5.2.50.0370.05710.86
5.2.40.0300.04010.82
5.2.30.0370.05010.91
5.2.20.0400.04010.79
5.2.10.0300.04310.72
5.2.00.0300.05010.63
5.1.60.0470.0409.97
5.1.50.0330.0239.85
5.1.40.0230.0509.89
5.1.30.0200.04010.28
5.1.20.0370.04010.29
5.1.10.0370.05010.04
5.1.00.0370.04710.23
5.0.50.0070.0478.47
5.0.40.0170.0238.34
5.0.30.0230.0578.27
5.0.20.0200.0338.07
5.0.10.0130.0308.15
5.0.00.0200.0338.14
4.4.90.0230.0306.50
4.4.80.0200.0336.50
4.4.70.0200.0336.50
4.4.60.0230.0276.50
4.4.50.0200.0176.50
4.4.40.0130.0406.50
4.4.30.0230.0306.50
4.4.20.0130.0336.50
4.4.10.0300.0176.50
4.4.00.0200.0406.50
4.3.110.0170.0236.50
4.3.100.0200.0336.50
4.3.90.0130.0236.50
4.3.80.0130.0306.50
4.3.70.0170.0176.50
4.3.60.0270.0276.50
4.3.50.0200.0336.50
4.3.40.0270.0376.50
4.3.30.0100.0336.50
4.3.20.0130.0336.50
4.3.10.0100.0376.50
4.3.00.0100.0306.50