3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a1 = array(1,2,3,4,5); $a2 = array(10,20,30,40,50); foreach($a1 as &$value){ // nop } foreach($a2 as &$value){ // nop } var_export($a1, $a2);
based on 7hTWL

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.01018.94
7.1.100.0750.01316.07
7.1.70.0030.00917.22
7.1.60.0140.01019.46
7.1.50.0160.00916.94
7.1.00.0000.08022.40
7.0.200.0000.00716.85
7.0.140.0000.05722.05
7.0.60.0070.08020.02
7.0.50.0000.05017.88
7.0.40.0030.05020.24
7.0.30.0300.07020.18
7.0.20.0130.04720.18
7.0.10.0070.05720.04
7.0.00.0130.05320.12
5.6.280.0000.07720.82
5.6.210.0030.08720.70
5.6.200.0070.03718.21
5.6.190.0030.08720.35
5.6.180.0370.04320.45
5.6.170.0130.04720.54
5.6.160.0030.04020.49
5.6.150.0100.06018.16
5.6.140.0030.03718.12
5.6.130.0030.08318.10
5.6.120.0130.07321.02
5.6.110.0130.08021.10
5.6.100.0070.07021.00
5.6.90.0130.08021.11
5.6.80.0130.06320.38
5.5.350.4170.04020.41
5.5.340.0100.07718.02
5.5.330.0070.08320.56
5.5.320.0300.06320.20
5.5.310.0200.05020.13
5.5.300.0030.03718.00
5.5.290.0030.08317.90
5.5.280.0070.05320.68
5.5.270.0070.08020.76
5.5.260.0030.04020.84
5.5.250.0070.03720.58
5.5.240.0030.08020.11
5.4.450.0700.05719.10
5.4.440.0870.05019.41
5.4.430.0630.05319.66
5.4.420.0730.06019.41
5.4.410.0600.05719.09
5.4.400.0770.04719.21
5.4.390.0270.04718.50
5.4.380.0270.05018.61
5.4.370.0170.08318.73
5.4.360.0200.06018.59
5.4.350.0300.05018.72
5.4.340.0230.05018.50
5.4.320.0270.04718.77
5.4.310.0200.05318.59
5.4.300.0300.06018.52
5.4.290.0300.05018.57
5.4.280.0300.05018.63
5.4.270.0200.05718.48
5.4.260.0200.06718.60
5.4.250.0300.06318.65
5.4.240.0170.06318.56
5.4.230.0170.05718.71
5.4.220.0170.06318.73
5.4.210.0200.06018.59
5.4.200.0200.05016.50
5.4.190.0170.05718.73
5.4.180.0170.06018.66
5.4.170.0300.04718.66
5.4.160.0230.05018.63
5.4.150.0170.06018.68
5.4.140.0300.04316.22
5.4.130.0230.05016.26
5.4.120.0130.06016.05
5.4.110.0300.04016.35
5.4.100.0270.04316.30
5.4.90.0170.05316.31
5.4.80.0170.05716.18
5.4.70.0170.05316.14
5.4.60.0200.05316.17
5.4.50.0200.05316.16
5.4.40.0430.05016.18
5.4.30.0230.06316.03
5.4.20.0230.06716.32
5.4.10.0270.04315.99
5.4.00.0230.04715.71
5.3.290.0230.06714.55
5.3.280.0230.05014.59
5.3.270.0300.06014.61
5.3.260.0200.05714.62
5.3.250.0230.04714.52
5.3.240.0230.04714.54
5.3.230.0200.05314.60
5.3.220.0130.06014.49
5.3.210.0170.05714.52
5.3.200.0270.04314.66
5.3.190.0230.05014.62
5.3.180.0200.05314.65
5.3.170.0130.05714.52
5.3.160.0130.06714.61
5.3.150.0170.06014.63
5.3.140.0130.06714.46
5.3.130.0370.04714.51
5.3.120.0330.04014.55
5.3.110.0200.05314.59
5.3.100.0170.05714.02
5.3.90.0230.04714.00
5.3.80.0230.04714.00
5.3.70.0230.04313.99
5.3.60.0300.05713.91
5.3.50.0170.05313.91
5.3.40.0130.05713.97
5.3.30.0230.05013.82
5.3.20.0130.06713.72
5.3.10.0170.05713.68
5.3.00.0170.06713.58
5.2.170.0230.05711.12
5.2.160.0200.05711.09
5.2.150.0300.04711.14
5.2.140.0200.05711.07
5.2.130.0100.04711.07
5.2.120.0170.04011.08
5.2.110.0130.04011.27
5.2.100.0230.03711.06
5.2.90.0170.04311.26
5.2.80.0170.04011.25
5.2.70.0200.04011.14
5.2.60.0200.04311.01
5.2.50.0100.06310.92
5.2.40.0200.04310.91
5.2.30.0100.06010.88
5.2.20.0170.03711.11
5.2.10.0170.04010.93
5.2.00.0130.04310.85
5.1.60.0100.0379.97
5.1.50.0300.02010.08
5.1.40.0030.0579.99
5.1.30.0130.03310.30
5.1.20.0200.03310.50
5.1.10.0100.04010.04
5.1.00.0100.03710.08
5.0.50.0070.0308.54
5.0.40.0130.0308.40
5.0.30.0100.0438.23
5.0.20.0100.0278.37
5.0.10.0030.0338.20
5.0.00.0100.0508.34
4.4.90.0070.0305.92
4.4.80.0100.0205.89
4.4.70.0070.0205.89
4.4.60.0100.0175.84
4.4.50.0100.0175.93
4.4.40.0070.0335.88
4.4.30.0070.0235.92
4.4.20.0070.0236.00
4.4.10.0100.0235.98
4.4.00.0070.0405.94
4.3.110.0100.0205.76
4.3.100.0070.0335.82
4.3.90.0030.0235.83
4.3.80.0030.0375.81
4.3.70.0000.0275.79
4.3.60.0070.0205.77
4.3.50.0130.0175.80
4.3.40.0070.0335.77
4.3.30.0070.0205.41
4.3.20.0000.0305.41
4.3.10.0030.0235.41
4.3.00.0170.0207.00