3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 100000; $container = new ArrayObject(array()); class A { protected $number; public function __construct() { $this->number = mt_rand(1, 10000); } } for ($i = 0; $i <= $iterations; ++$i) { $someVariable = new A; $container[] = $someVariable; }

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).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.10.0130.04524.00
7.4.00.0190.03824.07
7.3.130.0240.03424.12
7.3.120.0160.04124.15
7.3.110.0140.04523.98
7.3.100.0130.02524.07
7.3.90.0170.03724.36
7.3.80.0160.01624.29
7.3.70.0130.01723.96
7.3.60.0170.03724.00
7.3.50.0030.04524.21
7.3.40.0230.02024.08
7.3.30.0120.02124.02
7.3.20.0110.03526.95
7.3.10.0070.03026.53
7.3.00.0090.02226.70
7.2.260.0100.03424.62
7.2.250.0100.03024.16
7.2.240.0130.02324.39
7.2.230.0000.03924.26
7.2.220.0160.03924.29
7.2.210.0070.02724.38
7.2.200.0060.02924.39
7.2.190.0160.02824.39
7.2.180.0160.03924.03
7.2.170.0120.02224.21
7.2.160.0160.03324.46
7.2.150.0100.02827.17
7.2.140.0070.03727.10
7.2.130.0000.03527.23
7.2.120.0070.03527.06
7.2.110.0030.04127.11
7.2.100.0070.02627.28
7.2.90.0030.03426.93
7.2.80.0100.02927.13
7.2.70.0000.03327.15
7.2.60.0130.02027.20
7.2.50.0000.03327.00
7.2.40.0100.02327.04
7.2.30.0030.02627.22
7.2.20.0090.02227.29
7.2.10.0070.04027.05
7.2.00.0140.02127.07
7.1.330.0000.05225.84
7.1.320.0070.05926.04
7.1.310.0030.04326.07
7.1.300.0160.04925.97
7.1.290.0170.04425.95
7.1.280.0100.03926.04
7.1.270.0060.05126.00
7.1.260.0100.03925.80
7.1.250.0030.04226.07
7.1.240.0130.04125.75
7.1.230.0000.06626.05
7.1.220.0130.04025.97
7.1.210.0130.03925.87
7.1.200.0170.04026.02
7.1.190.0030.04325.98
7.1.180.0030.04426.06
7.1.170.0030.04526.18
7.1.160.0100.04025.86
7.1.150.0030.04725.68
7.1.140.0100.03526.15
7.1.130.0030.04926.07
7.1.120.0070.04226.14
7.1.110.0070.04225.91
7.1.100.0060.04226.09
7.1.90.0070.04526.21
7.1.80.0000.04726.07
7.1.70.0030.04026.79
7.1.60.0070.04526.87
7.1.50.0120.03826.63
7.1.40.0030.05026.14
7.1.30.0030.04726.05
7.1.20.0030.04726.08
7.1.10.0030.04426.07
7.1.00.0080.07429.35
7.0.330.0070.05725.82
7.0.320.0070.04025.75
7.0.310.0100.04525.75
7.0.300.0070.03825.50
7.0.290.0070.04125.76
7.0.280.0040.04225.46
7.0.270.0000.06725.88
7.0.260.0100.04625.63
7.0.250.0070.04125.77
7.0.240.0000.04625.93
7.0.230.0030.04625.87
7.0.220.0070.04125.94
7.0.210.0030.06525.88
7.0.200.2010.03525.17
7.0.190.0030.05825.68
7.0.180.0030.04225.59
7.0.170.0000.04825.75
7.0.160.0000.04825.83
7.0.150.0100.04225.90
7.0.140.0110.06828.93
7.0.130.0100.03925.46
7.0.120.0130.03725.38
7.0.110.0100.03425.82
7.0.100.0030.04625.70
7.0.90.0030.06925.92
7.0.80.0000.07225.50
7.0.70.0120.07228.48
7.0.60.0070.07128.36
7.0.50.0070.07428.59
7.0.40.0050.08023.02
7.0.30.0080.07322.08
7.0.20.0150.07522.08
7.0.10.0100.06822.11
7.0.00.0120.06521.85
5.6.400.0160.10747.34
5.6.390.0330.09647.36
5.6.380.0070.10447.63
5.6.370.0170.10647.59
5.6.360.0360.08547.05
5.6.350.0100.10147.36
5.6.340.0200.08747.55
5.6.330.0270.08047.32
5.6.320.0100.11347.64
5.6.310.0270.10847.23
5.6.300.0270.08047.23
5.6.290.0370.10347.46
5.6.280.0170.11951.38
5.6.270.0100.09947.39
5.6.260.0170.10747.11
5.6.250.0330.10247.46
5.6.240.0200.12247.63
5.6.230.0100.10247.67
5.6.220.0130.09650.93
5.6.210.0150.11950.85
5.6.200.0180.12551.77
5.6.190.0220.14651.17
5.6.180.0300.12551.27
5.6.170.0200.11451.21
5.6.160.0280.10250.63
5.6.150.0250.10350.65
5.6.140.0220.10950.52
5.6.130.0280.13050.75
5.6.120.0220.11250.79
5.6.110.0250.11150.78
5.6.100.0260.08451.23
5.6.90.0250.09351.17
5.6.80.0120.09950.37
5.6.70.0300.12050.72
5.6.60.0230.12350.69
5.6.50.0250.12550.44
5.6.40.0180.14350.81
5.6.30.0170.14250.95
5.6.20.0070.09151.29
5.6.10.0210.09750.33
5.6.00.0180.10850.85
5.5.380.0230.09047.38
5.5.370.0260.09947.37
5.5.360.0180.12650.50
5.5.350.0170.09451.23
5.5.340.0100.10850.89
5.5.330.0180.14450.79
5.5.320.0270.12151.54
5.5.310.0130.09950.56
5.5.300.0280.14250.59
5.5.290.0150.10050.68
5.5.280.0200.13650.75
5.5.270.0130.11051.35
5.5.260.0250.09150.64
5.5.250.0300.12151.37
5.5.240.0150.12650.61
5.5.230.0170.11651.01
5.5.220.0180.12751.04
5.5.210.0170.13450.95
5.5.200.0230.11651.04
5.5.190.0180.12150.71
5.5.180.0280.11750.59
5.5.170.0260.13547.30
5.5.160.0160.09150.82
5.5.150.0180.08950.21
5.5.140.0170.12750.95
5.5.130.0170.10050.74
5.5.120.0130.11250.39
5.5.110.0220.12650.99
5.5.100.0120.10850.97
5.5.90.0180.14350.44
5.5.80.0120.12750.62
5.5.70.0180.10050.42
5.5.60.0180.10351.01
5.5.50.0170.08850.08
5.5.40.0130.12350.83
5.5.30.0170.10950.67
5.5.20.0150.10450.92
5.5.10.0180.10250.62
5.5.00.0120.11050.94
5.4.450.0230.10548.33
5.4.440.0230.09948.89
5.4.430.0200.13348.54
5.4.420.0170.11648.63
5.4.410.0100.11448.11
5.4.400.0250.10648.87
5.4.390.0130.12548.77
5.4.380.0180.10049.07
5.4.370.0230.12648.33
5.4.360.0250.12548.57
5.4.350.0180.09148.27
5.4.340.0150.12448.47
5.4.330.0130.09743.89
5.4.320.0200.10248.18
5.4.310.0150.09548.82
5.4.300.0150.09248.82
5.4.290.0130.11948.03
5.4.280.0230.12748.45
5.4.270.0230.13248.42
5.4.260.0130.12248.27
5.4.250.0130.11848.72
5.4.240.0180.11248.34
5.4.230.0160.09948.73
5.4.220.0130.09148.15
5.4.210.0130.10648.45
5.4.200.0120.10648.74
5.4.190.0150.10447.85
5.4.180.0150.10948.25
5.4.170.0220.09348.53
5.4.160.0080.10748.72
5.4.150.0150.11048.82
5.4.140.0150.10946.61
5.4.130.0200.08646.90
5.4.120.0180.09447.20
5.4.110.0210.09146.58
5.4.100.0120.09046.95
5.4.90.0130.09347.00
5.4.80.0130.09247.21
5.4.70.0130.09446.77
5.4.60.0080.12446.73
5.4.50.0200.13547.40
5.4.40.0220.10247.28
5.4.30.0270.12147.24
5.4.20.0170.12947.32
5.4.10.0200.12046.72
5.4.00.0230.10246.71
5.3.290.0100.19070.94
5.3.280.0230.15769.65
5.3.270.0130.11771.80
5.3.260.0270.10371.05
5.3.250.0200.11069.55
5.3.240.0100.14370.93
5.3.230.0100.10770.30
5.3.220.0230.12370.96
5.3.210.0130.12070.14
5.3.200.0200.11070.38
5.3.190.0270.10769.81
5.3.180.0230.10770.08
5.3.170.0170.09769.15
5.3.160.0300.13370.05
5.3.150.0200.15070.25
5.3.140.0370.11371.09
5.3.130.0130.19069.39
5.3.120.0200.18370.17
5.3.110.0130.12369.73
5.3.100.0200.14768.83
5.3.90.0230.16770.23
5.3.80.0130.18769.59
5.3.70.0170.11770.10
5.3.60.0100.17369.62
5.3.50.0200.14768.79
5.3.40.0230.13369.84
5.3.30.0170.16068.89
5.3.20.0300.15070.18
5.3.10.0170.16368.45
5.3.00.0130.12068.97
5.2.170.0470.15363.62
5.2.160.0170.17763.80
5.2.150.0230.13762.37
5.2.140.0300.15762.35
5.2.130.0070.13762.31
5.2.120.0330.14363.51
5.2.110.0230.11063.73
5.2.100.0300.16763.19
5.2.90.0130.12763.48
5.2.80.0200.16363.31
5.2.70.0130.12062.27
5.2.60.0200.17362.10
5.2.50.0200.12062.56
5.2.40.0230.17362.02
5.2.30.0200.18363.24
5.2.20.0130.12362.30
5.2.10.0200.15062.42
5.2.00.0200.13762.85
5.1.60.0200.11377.57
5.1.50.0130.12077.57
5.1.40.0430.13777.01
5.1.30.0300.12076.65
5.1.20.0430.15076.66
5.1.10.0170.17077.06
5.1.00.0200.19376.31
5.0.50.0270.15074.83
5.0.40.0230.14375.92
5.0.30.0100.20374.51
5.0.20.0230.17374.42
5.0.10.0300.15774.31
5.0.00.0230.14375.67
4.4.90.0030.03310.59
4.4.80.0030.03310.59
4.4.70.0100.02710.59
4.4.60.0030.01710.59
4.4.50.0000.01710.59
4.4.40.0000.05010.59
4.4.30.0030.02010.59
4.4.20.0030.03010.59
4.4.10.0000.03710.59
4.4.00.0000.05010.59
4.3.110.0000.01710.59
4.3.100.0000.01310.59
4.3.90.0030.03310.59
4.3.80.0030.04310.59
4.3.70.0030.01710.59
4.3.60.0000.03310.59
4.3.50.0000.01710.59
4.3.40.0030.05010.59
4.3.30.0000.01710.59
4.3.20.0030.03710.59
4.3.10.0030.03310.59
4.3.00.0000.04010.59

preferences:
43.26 ms | 401 KiB | 5 Q