3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [ 'A', 'B', 'C', 'D']; foreach ($arr as &$item) { $item = "E"; } var_dump($arr);

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.0120.00016.95
7.2.50.0130.00016.98
7.2.00.0000.01219.38
7.1.200.0090.00315.73
7.1.100.0000.01218.13
7.1.70.0000.00817.27
7.1.60.0140.01019.50
7.1.50.0070.01416.86
7.1.00.0070.07322.51
7.0.200.0230.00716.80
7.0.140.0000.06722.09
7.0.60.0130.07719.91
7.0.50.0030.08017.80
7.0.40.0100.05020.09
7.0.30.0370.07320.21
7.0.20.0230.08720.16
7.0.10.0070.07720.16
7.0.00.0130.08020.29
5.6.280.0000.07721.14
5.6.210.0130.05320.66
5.6.200.0130.04018.15
5.6.190.0000.05020.43
5.6.180.4800.03720.60
5.6.170.0130.04320.51
5.6.160.0030.05020.48
5.6.150.0030.08318.13
5.6.140.0030.08718.15
5.6.130.0070.07718.12
5.6.120.0030.04321.00
5.6.110.0070.08020.97
5.6.100.0170.06321.02
5.6.90.0000.06320.95
5.6.80.0070.05020.40
5.6.70.4630.03720.50
5.5.350.0130.07720.52
5.5.340.0070.04318.02
5.5.330.0070.07020.42
5.5.320.0270.07020.28
5.5.310.0430.06320.32
5.5.300.0030.04317.91
5.5.290.0100.07717.88
5.5.280.0070.07720.77
5.5.270.0100.05020.86
5.5.260.0100.04020.76
5.5.250.0100.07020.57
5.5.240.0000.06320.35
5.4.450.0600.06319.39
5.4.440.0870.06319.53
5.4.430.0100.05319.28
5.4.420.0270.03719.10
5.4.410.1030.06019.18
5.4.400.0470.05318.79
5.4.390.0430.06318.63
5.4.380.0400.05718.68
5.4.370.0300.06718.57
5.4.360.0300.06318.65
5.4.350.0470.07718.71
5.4.340.0430.05718.45
5.4.320.0530.07018.70
5.4.310.0330.06018.77
5.4.300.0470.07018.73
5.4.290.0500.04318.61
5.4.280.0430.05318.62
5.4.270.0400.05318.54
5.4.260.0330.05718.76
5.4.250.0500.07018.55
5.4.240.0330.06318.52
5.4.230.0400.04718.48
5.4.220.0330.05718.76
5.4.210.0300.08718.57
5.4.200.0500.04016.67
5.4.190.0330.07018.61
5.4.180.0530.04318.59
5.4.170.0400.07318.66
5.4.160.0500.04718.54
5.4.150.0470.05018.72
5.4.140.0370.05316.27
5.4.130.0370.07316.13
5.4.120.0400.07016.20
5.4.110.0470.06016.36
5.4.100.0500.05316.05
5.4.90.0330.05716.12
5.4.80.0400.04316.20
5.4.70.0430.04716.17
5.4.60.0500.06316.19
5.4.50.0370.08016.16
5.4.40.0370.07716.18
5.4.30.0270.07016.22
5.4.20.0430.07316.22
5.4.10.0470.06016.12
5.4.00.0300.08015.67
5.3.290.0600.05714.75
5.3.280.0500.06714.55
5.3.270.0430.06714.59
5.3.260.0430.06714.66
5.3.250.0370.07714.65
5.3.240.0470.08014.60
5.3.230.0300.06314.57
5.3.220.0430.05714.48
5.3.210.0400.05714.52
5.3.200.0330.05314.50
5.3.190.0300.06314.56
5.3.180.0470.05714.51
5.3.170.0370.05014.61
5.3.160.0400.04714.49
5.3.150.0500.06314.62
5.3.140.0330.08314.53
5.3.130.0500.06714.45
5.3.120.0530.07314.63
5.3.110.0430.07714.55
5.3.100.0400.08014.01
5.3.90.0430.06714.00
5.3.80.0300.06714.11
5.3.70.0430.04313.99
5.3.60.0400.05013.89
5.3.50.0470.05313.97
5.3.40.0370.05713.94
5.3.30.0370.05713.84
5.3.20.0500.03713.68
5.3.10.0470.05713.77
5.3.00.0270.06713.63
5.2.170.0270.04711.10
5.2.160.0300.04311.06
5.2.150.0330.04011.20
5.2.140.0300.04011.07
5.2.130.0400.04711.03
5.2.120.0270.04311.10
5.2.110.0230.05311.15
5.2.100.0270.04311.06
5.2.90.0370.03311.08
5.2.80.0230.04311.25
5.2.70.0300.03711.23
5.2.60.0300.04311.18
5.2.50.0230.04310.99
5.2.40.0200.06310.95
5.2.30.0130.05310.95
5.2.20.0370.03710.87
5.2.10.0330.03310.90
5.2.00.0300.05010.74
5.1.60.0200.03710.06
5.1.50.0200.03310.05
5.1.40.0230.0509.93
5.1.30.0300.03710.33
5.1.20.0230.05310.34
5.1.10.0200.04310.20
5.1.00.0270.03310.09
5.0.50.0330.0338.58
5.0.40.0270.0378.48
5.0.30.0170.0538.32
5.0.20.0170.0378.19
5.0.10.0130.0378.26
5.0.00.0200.0378.19
4.4.90.0100.0276.90
4.4.80.0070.0276.90
4.4.70.0130.0206.90
4.4.60.0070.0276.90
4.4.50.0170.0176.90
4.4.40.0170.0406.90
4.4.30.0100.0236.90
4.4.20.0170.0236.90
4.4.10.0130.0236.90
4.4.00.0130.0406.90
4.3.110.0070.0276.90
4.3.100.0100.0206.90
4.3.90.0070.0236.90
4.3.80.0170.0276.90
4.3.70.0100.0206.90
4.3.60.0100.0276.90
4.3.50.0070.0276.90
4.3.40.0130.0376.90
4.3.30.0070.0236.90
4.3.20.0000.0276.90
4.3.10.0070.0236.90
4.3.00.0200.0176.79