3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { protected $x = array(); public function __construct() { $this->x = range(1,10000); } } $a = array(); for ($i = 0; $i < 2000; $i++) { $a []= new A(); }

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.3.00.0560.01378.72
7.2.130.0720.01378.62
7.2.120.0580.01478.80
7.2.110.0550.01478.85
7.2.100.0720.01478.86
7.2.90.0270.01078.83
7.2.80.0670.01078.84
7.2.70.0550.02178.73
7.2.60.0810.01578.64
7.2.50.0880.01178.42
7.2.40.0630.02278.86
7.2.30.0540.03478.50
7.2.20.0820.01578.82
7.2.10.0740.01478.42
7.2.00.0510.01179.94
7.1.250.0580.01477.55
7.1.240.0540.02277.64
7.1.230.0460.01877.47
7.1.220.0590.01377.71
7.1.210.0280.01877.65
7.1.200.1380.01077.65
7.1.190.0470.02077.63
7.1.180.0770.02077.53
7.1.170.0520.02577.63
7.1.160.0790.02177.47
7.1.150.0240.02077.60
7.1.140.0680.02377.65
7.1.130.0610.01677.70
7.1.120.0620.01577.80
7.1.110.0500.01877.48
7.1.100.0360.02178.79
7.1.90.0500.02977.77
7.1.80.0430.02977.83
7.1.70.0410.01178.40
7.1.60.0400.02578.48
7.1.50.0410.02178.09
7.1.40.0750.02077.41
7.1.30.0800.02777.69
7.1.20.0810.02077.36
7.1.10.0690.02177.77
7.1.00.0440.05180.99
7.0.330.0310.02777.39
7.0.320.0550.01477.47
7.0.310.0740.01377.20
7.0.300.0730.01377.51
7.0.290.0650.02077.52
7.0.280.0420.01977.35
7.0.270.0360.02077.40
7.0.260.0610.01377.35
7.0.250.0510.01577.39
7.0.240.0680.01277.45
7.0.230.0870.01677.46
7.0.220.0720.01677.48
7.0.210.0560.01477.34
7.0.200.3550.01862.01
7.0.190.0510.01477.58
7.0.180.0290.02377.50
7.0.170.0730.01677.13
7.0.160.0760.02077.23
7.0.150.0640.02077.53
7.0.140.0460.05180.90
7.0.130.0660.01277.53
7.0.120.0460.04680.54
7.0.110.0380.05080.76
7.0.100.0490.04880.63
7.0.90.0470.04880.71
7.0.80.0400.04580.78
7.0.70.0410.04480.76
7.0.60.0500.04480.60
7.0.50.0480.04780.79
7.0.40.0220.04648.84
7.0.30.0170.05148.66
7.0.20.0070.05948.57
7.0.10.0170.04748.74
7.0.00.0170.04848.69
5.6.380.0580.05278.97
5.6.370.0380.06578.80
5.6.360.0480.05779.29
5.6.350.0340.07579.41
5.6.340.0510.06378.74
5.6.330.0340.07578.67
5.6.320.0350.06379.24
5.6.310.0460.07778.84
5.6.300.0480.06379.27
5.6.290.0410.06379.25
5.6.280.0370.09282.21
5.6.270.0520.06579.30
5.6.260.0320.09982.35
5.6.250.0420.09482.55
5.6.240.0400.09382.48
5.6.230.0260.10982.52
5.6.220.0360.08082.47
5.6.210.0430.08682.37
5.6.200.0310.10482.31
5.6.190.0440.08682.32
5.6.180.0400.09182.47
5.6.170.0270.11282.51
5.6.160.0450.09582.24
5.6.150.0370.10282.37
5.6.140.0310.09382.33
5.6.130.0350.09382.54
5.6.120.0310.09782.57
5.6.110.0380.09382.45
5.6.100.0310.09582.38
5.6.90.0350.09882.43
5.6.80.0250.10081.88
5.6.70.0380.08281.84
5.6.60.0280.10282.15
5.6.50.0300.10081.95
5.6.40.0330.08481.99
5.6.30.0210.11181.95
5.6.20.0300.10482.00
5.6.10.0320.09782.02
5.6.00.0340.09482.17
5.5.380.0360.10179.08
5.5.370.0400.09279.16
5.5.360.0170.11579.15
5.5.350.0370.09379.12
5.5.340.0320.09279.28
5.5.330.0360.08679.29
5.5.320.0400.09279.37
5.5.310.0390.09479.40
5.5.300.0270.09779.25
5.5.290.0320.09779.33
5.5.280.0410.08479.20
5.5.270.0350.09079.32
5.5.260.0270.09979.18
5.5.250.0270.09878.97
5.5.240.0250.10178.81
5.5.230.0400.08378.97
5.5.220.0290.09279.04
5.5.210.0320.09978.94
5.5.200.0380.08978.86
5.5.190.0210.10479.07
5.5.180.0380.09279.09
5.5.170.0430.06575.80
5.5.160.0390.08878.90
5.5.150.0150.10978.99
5.5.140.0400.08978.87
5.5.130.0300.09278.89
5.5.120.0370.09879.05
5.5.110.0320.08479.03
5.5.100.0320.08278.98
5.5.90.0380.09478.87
5.5.80.0300.07578.92
5.5.70.0400.07078.81
5.5.60.0290.09478.94
5.5.50.0340.09478.76
5.5.40.0150.10579.03
5.5.30.0270.09078.81
5.5.20.0340.09378.98
5.5.10.0330.08978.67
5.5.00.0310.09578.90
5.4.450.0220.10379.88
5.4.440.0330.10080.00
5.4.430.0240.10479.91
5.4.420.0390.08479.96
5.4.410.0290.09279.89
5.4.400.0340.08779.76
5.4.390.0200.10179.74
5.4.380.0370.08479.72
5.4.370.0180.09879.53
5.4.360.0300.10479.89
5.4.350.0420.07379.85
5.4.340.0380.09079.87
5.4.330.0440.05475.96
5.4.320.0250.10379.83
5.4.310.0370.08979.68
5.4.300.0350.08179.69
5.4.290.0270.08679.71
5.4.280.0340.09279.67
5.4.270.0380.08679.79
5.4.260.0290.07679.85
5.4.250.0260.10179.77
5.4.240.0220.08779.87
5.4.230.0310.07379.77
5.4.220.0240.10079.68
5.4.210.0430.08079.83
5.4.200.0420.08179.77
5.4.190.0300.09379.73
5.4.180.0290.09679.66
5.4.170.0350.08079.76
5.4.160.0210.08379.68
5.4.150.0280.09979.83
5.4.140.0320.09378.43
5.4.130.0230.10278.50
5.4.120.0330.08878.38
5.4.110.0320.08778.51
5.4.100.0310.09878.30
5.4.90.0310.09178.47
5.4.80.0250.09578.49
5.4.70.0240.09978.32
5.4.60.0260.09678.36
5.4.50.0300.09578.38
5.4.40.0200.10578.41
5.4.30.0410.08178.45
5.4.20.0300.09778.47
5.4.10.0400.08878.43
5.4.00.0340.08778.19
5.3.290.0310.09375.75
5.3.280.0230.08775.69
5.3.270.0230.10775.77
5.3.260.0310.09975.76
5.3.250.0310.09375.89
5.3.240.0250.10175.68
5.3.230.0270.09675.82
5.3.220.0320.08975.74
5.3.210.0250.07875.65
5.3.200.0230.09975.67
5.3.190.0370.08875.64
5.3.180.0320.09275.70
5.3.170.0320.09775.50
5.3.160.0290.09575.74
5.3.150.0170.09575.86
5.3.140.0310.09575.61
5.3.130.0280.10275.68
5.3.120.0400.09375.69
5.3.110.0300.09875.56
5.3.100.0320.10175.33
5.3.90.0250.10675.34
5.3.80.0290.10275.18
5.3.70.0280.09575.33
5.3.60.0250.09275.05
5.3.50.0250.08475.15
5.3.40.0350.08275.12
5.3.30.0380.08875.15
5.3.20.0240.08674.99
5.3.10.0380.08875.08
5.3.00.0210.09774.85
5.2.170.0220.10573.92
5.2.160.0320.09573.95
5.2.150.0290.09673.92
5.2.140.0210.10573.98
5.2.130.0410.07973.86
5.2.120.0260.09673.98
5.2.110.0230.09773.84
5.2.100.0340.10074.44
5.2.90.0260.09974.01
5.2.80.0230.09973.70
5.2.70.0270.10973.94
5.2.60.0370.08773.63
5.2.50.0330.12273.79
5.2.40.0340.12273.82
5.2.30.0290.11073.75
5.2.20.0260.13173.71
5.2.10.0250.08473.70
5.2.00.0970.209263.43
5.1.60.0830.190262.89
5.1.50.0860.180262.96
5.1.40.0830.182262.95
5.1.30.0970.160263.08
5.1.20.1060.171263.12
5.1.10.0960.192263.06
5.1.00.1130.168262.76
5.0.50.1030.153262.30
5.0.40.0820.177262.27
5.0.30.0870.167262.22
5.0.20.0890.169262.20
5.0.10.1060.164261.98
5.0.00.0970.174262.15
4.4.90.0040.01511.68
4.4.80.0020.01711.68
4.4.70.0000.01811.68
4.4.60.0010.01611.68
4.4.50.0000.01811.68
4.4.40.0030.02511.68
4.4.30.0020.01111.68
4.4.20.0020.01711.68
4.4.10.0020.01311.68
4.4.00.0000.02611.68
4.3.110.0020.01811.68
4.3.100.0030.01611.68
4.3.90.0050.01311.68
4.3.80.0050.02211.68
4.3.70.0030.01411.68
4.3.60.0050.01311.68
4.3.50.0000.01811.68
4.3.40.0020.02411.68
4.3.30.0020.01511.68
4.3.20.0030.01511.68
4.3.10.0030.01611.68
4.3.00.0020.01611.68