3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Clazz { private $containers; public function __construct(array $containers) { $this->containers = $containers; } } $containers = array(); for ($i = 0; $i < 100000; $i++) { $containers['a' . $i] = array('a' => 'a' . $i, 'b' => 'b' . $i); } $clazz = new Clazz($containers);

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)
8.3.60.0560.02665.39
8.3.50.0700.03765.50
8.3.40.0450.00746.55
8.3.30.0230.02946.77
8.3.20.0140.01446.62
8.3.10.0140.00746.88
8.3.00.0220.00945.50
8.2.180.0670.04065.77
8.2.170.0330.02948.70
8.2.160.0440.02450.20
8.2.150.0190.01348.91
8.2.140.0250.00650.27
8.2.130.0190.01350.14
8.2.120.0100.01048.30
8.2.110.0030.02149.53
8.2.100.0240.02047.66
8.2.90.0200.01348.90
8.2.80.0100.02447.80
8.2.70.0190.01347.13
8.2.60.0140.02147.78
8.2.50.0180.01547.50
8.2.40.0190.01247.64
8.2.30.0100.02047.80
8.2.20.0170.01447.48
8.2.10.0170.01447.57
8.2.00.0160.01947.45
8.1.280.0550.02667.03
8.1.270.0160.01651.94
8.1.260.0110.01447.77
8.1.250.0270.00350.54
8.1.240.0200.01450.77
8.1.230.0230.01950.72
8.1.220.0180.01547.29
8.1.210.0130.01948.65
8.1.200.0170.01747.11
8.1.190.0100.02047.28
8.1.180.0030.02746.84
8.1.170.0130.01748.58
8.1.160.0170.01348.48
8.1.150.0170.01448.11
8.1.140.0210.01047.06
8.1.130.0100.01747.45
8.1.120.0200.01046.93
8.1.110.0140.01746.99
8.1.100.0130.01646.82
8.1.90.0200.01046.93
8.1.80.0130.01946.99
8.1.70.0140.01746.89
8.1.60.0160.01647.11
8.1.50.0100.02447.00
8.1.40.0070.02746.93
8.1.30.0150.01847.00
8.1.20.0160.01947.11
8.1.10.0240.02466.64
8.1.00.0210.03266.64
8.0.300.0280.02169.10
8.0.290.0260.01965.93
8.0.280.0260.02067.38
8.0.270.0200.02766.37
8.0.260.0270.02765.88
8.0.250.0070.03465.97
8.0.240.0300.03165.95
8.0.230.0170.02866.07
8.0.220.0170.02665.92
8.0.210.0100.03966.02
8.0.200.0140.02865.97
8.0.190.0190.03265.93
8.0.180.0130.03665.93
8.0.170.0300.02065.90
8.0.160.0130.03766.03
8.0.150.0130.03565.93
8.0.140.0550.02565.79
8.0.130.0170.03062.48
8.0.120.0190.02865.86
8.0.110.0260.02266.00
8.0.100.0100.04065.73
8.0.90.0330.01765.84
8.0.80.0400.05765.78
8.0.70.0290.01965.76
8.0.60.0140.03465.83
8.0.50.0100.03765.87
8.0.30.0590.06665.94
8.0.20.0570.06366.32
8.0.10.0230.02765.91
8.0.00.0620.07265.70
7.4.330.0180.02561.96
7.4.320.0140.03165.54
7.4.300.0230.02365.44
7.4.290.0170.03365.34
7.4.280.0230.02665.48
7.4.270.0270.02765.49
7.4.260.0160.03862.37
7.4.250.0170.03665.53
7.4.240.0160.03565.54
7.4.230.0160.02965.62
7.4.220.0740.06465.38
7.4.210.0450.05965.57
7.4.200.0100.04065.44
7.4.190.0170.03365.63
7.4.160.0650.06865.42
7.4.150.0580.05465.62
7.4.140.0470.06065.46
7.4.130.0500.05865.54
7.4.120.0540.05165.62
7.4.110.0590.07965.49
7.4.100.0740.07765.43
7.4.90.0390.06965.45
7.4.80.0590.08365.65
7.4.70.0410.06565.55
7.4.60.0660.04365.62
7.4.50.0170.01765.28
7.4.40.0130.05665.27
7.4.30.0380.06665.46
7.4.00.0230.04964.15
7.3.330.0270.02762.46
7.3.320.0200.03062.26
7.3.310.0200.03065.37
7.3.300.0230.02665.21
7.3.290.0620.07765.26
7.3.280.0490.06265.28
7.3.270.0760.06365.63
7.3.260.0550.05365.44
7.3.250.0610.08865.58
7.3.240.0500.05465.52
7.3.230.0460.06565.58
7.3.210.0570.05465.38
7.3.200.0590.09965.52
7.3.190.0670.10765.45
7.3.180.0650.04365.33
7.3.170.0450.06665.49
7.3.160.0630.08365.45
7.3.120.0330.04363.75
7.2.330.0610.05865.10
7.2.320.0520.05965.18
7.2.310.0710.07165.12
7.2.300.0620.05265.01
7.2.290.0680.09164.93
7.2.00.5390.03066.57
7.1.101.3150.05065.34
7.1.70.0030.05965.20
7.1.60.0130.07365.11
7.1.50.0340.08365.24
7.1.00.0070.11370.26
7.0.200.6530.03663.70
7.0.140.0000.13069.99
7.0.120.0100.11370.06
7.0.60.0230.13368.50
7.0.50.0130.07366.45
7.0.40.0300.11724.00
7.0.30.0330.09024.02
7.0.20.0430.12023.86
7.0.10.0370.08023.97
7.0.00.0200.07323.89
5.6.280.0270.18384.44
5.6.210.0270.19384.28
5.6.200.0370.11781.74
5.6.190.0330.14083.86
5.6.180.0430.12783.95
5.6.170.0470.17783.87
5.6.160.0200.13383.93
5.6.150.0300.18381.68
5.6.140.0230.13381.67
5.6.130.0100.13081.66
5.6.120.0270.12084.61
5.6.110.0300.17784.45
5.6.100.0270.19084.56
5.6.90.0230.11784.66
5.6.80.0270.13783.97
5.6.70.2870.10083.93
5.5.350.0630.15783.96
5.5.340.0430.17781.47
5.5.330.0270.18783.70
5.5.320.0700.14083.69
5.5.310.0470.14383.80
5.5.300.0330.11081.50
5.5.290.0170.12781.51
5.5.280.0200.17384.32
5.5.270.0230.14784.35
5.5.260.0130.19784.42
5.5.250.0230.19084.27
5.5.240.0430.17783.71
5.4.450.0200.12382.96
5.4.440.0200.12082.93
5.4.430.0300.18083.05
5.4.420.0230.15082.89
5.4.410.0430.16082.91
5.4.400.0330.16782.35
5.4.390.0130.17082.51
5.4.380.0130.17782.54
5.4.370.0200.11382.30
5.4.360.0370.16382.36
5.4.350.0200.11782.34
5.4.340.0200.16382.57
5.4.320.0230.19082.45
5.4.310.0200.11782.66
5.4.300.0230.11782.75
5.4.290.0170.17382.36
5.4.280.0130.17082.43
5.4.270.0100.18082.34
5.4.260.0300.10382.57
5.4.250.0130.12082.29
5.4.240.0200.12082.32
5.4.230.0200.18082.54
5.4.220.0330.13782.36
5.4.210.0270.12782.46
5.4.200.0170.16782.43
5.4.190.0300.17782.50
5.4.180.0100.13082.62
5.4.170.0230.14082.56
5.4.160.0200.12782.54
5.4.150.0200.17782.32
5.4.140.0400.16079.95
5.4.130.0170.16079.82
5.4.120.0270.13079.90
5.4.110.0200.18380.07
5.4.100.0100.12779.98
5.4.90.0330.14779.82
5.4.80.0400.15379.97
5.4.70.0170.12079.90
5.4.60.0100.13780.00
5.4.50.0130.12379.87
5.4.40.0200.11779.76
5.4.30.0230.16779.79
5.4.20.0330.15779.79
5.4.10.0200.17779.93
5.4.00.0230.16779.38
5.3.290.0230.12377.70
5.3.280.0330.16777.74
5.3.270.0270.11377.74
5.3.260.0300.18077.79
5.3.250.0230.19077.79
5.3.240.0200.18777.77
5.3.230.0300.17777.76
5.3.220.0270.12077.74
5.3.210.0330.16777.82
5.3.200.0030.13777.75
5.3.190.0430.15777.68
5.3.180.0270.18377.73
5.3.170.0100.13077.65
5.3.160.0070.17077.68
5.3.150.0270.16377.71
5.3.140.0200.19077.65
5.3.130.0200.19377.71
5.3.120.0200.17777.73
5.3.110.0230.18777.66
5.3.100.0170.12377.14
5.3.90.0130.12777.19
5.3.80.0400.16377.13
5.3.70.0170.15077.07
5.3.60.0300.14377.08
5.3.50.0330.13377.05
5.3.40.0270.14076.98
5.3.30.0270.18377.00
5.3.20.0270.14776.75
5.3.10.0100.13076.77
5.3.00.0070.13376.83
5.2.170.0330.15372.94
5.2.160.0170.12072.99
5.2.150.0300.17372.92
5.2.140.0270.15072.97
5.2.130.0270.11772.89
5.2.120.0130.12072.86
5.2.110.0200.16372.89
5.2.100.0230.11072.78
5.2.90.0170.17073.02
5.2.80.0100.17772.91
5.2.70.0200.11772.86
5.2.60.0270.14772.96
5.2.50.0270.19072.61
5.2.40.0230.13772.59
5.2.30.0170.14372.64
5.2.20.0230.14072.56
5.2.10.0170.12072.68
5.2.00.0200.14072.46
5.1.60.0300.19390.20
5.1.50.0130.14090.13
5.1.40.0170.16390.09
5.1.30.0170.15090.48
5.1.20.0300.13390.51
5.1.10.0270.18390.11
5.1.00.0230.13390.17
5.0.50.0030.0178.54
5.0.40.0030.0238.49
5.0.30.0000.0638.19
5.0.20.0100.0278.17
5.0.10.0070.0408.22
5.0.00.0030.0638.17
4.4.90.0030.0178.17
4.4.80.0030.0338.17
4.4.70.0070.0238.17
4.4.60.0000.0238.17
4.4.50.0030.0138.17
4.4.40.0030.0378.17
4.4.30.0000.0378.17
4.4.20.0030.0178.17
4.4.10.0030.0138.17
4.4.00.0000.0338.17
4.3.110.0030.0338.17
4.3.100.0000.0178.17
4.3.90.0030.0378.17
4.3.80.0070.0308.17
4.3.70.0030.0338.17
4.3.60.0000.0378.17
4.3.50.0030.0278.17
4.3.40.0000.0378.17
4.3.30.0000.0278.17
4.3.20.0070.0108.17
4.3.10.0030.0338.17
4.3.00.0000.0238.17

preferences:
46.08 ms | 401 KiB | 5 Q