3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Collection extends ArrayObject { public function getIterator() { return new ArrayIterator((array)$this); } } gc_enable(); foreach (range(1, 5000000) as $i) { $collection = new Collection([ 'foo', 'bar' ]); foreach ($collection as $item) { echo $item; } unset($collection); }

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.0120.00616.47
8.3.50.0090.01022.00
8.3.40.0070.00718.46
8.3.30.0140.00319.09
8.3.20.0080.00020.18
8.3.10.0060.00323.48
8.3.00.0040.00420.84
8.2.180.0070.01117.00
8.2.170.0120.00322.96
8.2.160.0030.01020.52
8.2.150.0080.00024.18
8.2.140.0110.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00419.06
8.2.110.0030.00622.14
8.2.100.0000.01117.59
8.2.90.0040.00419.16
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0040.00417.91
8.2.50.0090.00018.07
8.2.40.0040.00419.79
8.2.30.0000.00918.02
8.2.20.0090.00017.56
8.2.10.0040.00418.00
8.2.00.0000.00717.47
8.1.280.0060.01025.92
8.1.270.0000.00822.19
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0060.00324.02
8.1.230.0030.00819.15
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0030.00617.10
8.1.190.0040.00417.25
8.1.180.0030.00618.89
8.1.170.0070.00418.50
8.1.160.0000.00821.92
8.1.150.0040.00418.46
8.1.140.0000.00717.24
8.1.130.0070.00017.77
8.1.120.0070.00017.36
8.1.110.0040.00317.32
8.1.100.0020.00517.29
8.1.90.0000.00817.38
8.1.80.0040.00417.36
8.1.70.0030.00317.25
8.1.60.0030.00517.35
8.1.50.0060.00317.35
8.1.40.0070.00017.27
8.1.30.0090.00017.38
8.1.20.0060.00317.57
8.1.10.0000.00817.28
8.1.00.0070.00017.18
8.0.300.0050.00218.77
8.0.290.0080.00017.05
8.0.280.0000.00718.23
8.0.270.0030.00317.11
8.0.260.0030.00317.13
8.0.250.0030.00316.86
8.0.240.0030.00616.96
8.0.230.0000.00716.87
8.0.220.0040.00416.70
8.0.210.0030.00316.89
8.0.200.0000.00616.94
8.0.190.0040.00416.80
8.0.180.0040.00416.89
8.0.170.0040.00416.84
8.0.160.0000.00816.87
8.0.150.0000.00816.67
8.0.140.0080.00016.68
8.0.130.0030.00313.30
8.0.120.0000.00816.70
8.0.110.0040.00416.82
8.0.100.0000.00816.83
8.0.90.0080.00016.90
8.0.80.0060.00916.77
8.0.70.0070.00016.87
8.0.60.0000.00816.77
8.0.50.0000.00816.70
8.0.30.0080.01416.91
8.0.20.0080.01117.40
8.0.10.0020.00516.86
8.0.00.0140.00316.57
7.4.330.0020.00215.00
7.4.320.0000.00716.29
7.4.300.0030.00316.32
7.4.290.0030.00316.31
7.4.280.0040.00416.50
7.4.270.0000.00716.49
7.4.260.0000.00716.45
7.4.250.0070.00016.35
7.4.240.0030.00516.34
7.4.230.0000.00716.38
7.4.220.0060.01216.40
7.4.210.0040.00916.49
7.4.200.0040.00416.55
7.4.190.0060.00316.34
7.4.160.0060.01216.49
7.4.150.0100.00717.40
7.4.140.0100.01117.86
7.4.130.0100.00916.37
7.4.120.0130.00616.36
7.4.110.0070.01016.45
7.4.100.0140.00716.45
7.4.90.0110.01416.41
7.4.80.0120.00819.39
7.4.70.0070.00716.16
7.4.60.0100.01316.31
7.4.50.0030.00516.41
7.4.40.0090.00916.26
7.4.30.0120.00916.33
7.4.00.0040.01114.50
7.3.330.0000.00513.24
7.3.320.0000.00513.00
7.3.310.0030.00516.26
7.3.300.0030.00316.27
7.3.290.0090.00916.25
7.3.280.0070.00916.24
7.3.270.0150.00017.40
7.3.260.0110.00616.41
7.3.250.0060.01416.26
7.3.240.0100.00716.28
7.3.230.0160.00016.45
7.3.210.0040.01216.43
7.3.200.0110.01419.39
7.3.190.0140.00416.26
7.3.180.0030.01216.36
7.3.170.0130.01016.27
7.3.160.0100.00616.32
7.3.120.0060.01214.73
7.2.330.0100.01016.44
7.2.320.0090.00916.52
7.2.310.0100.01316.45
7.2.300.0180.00616.26
7.2.290.0060.01116.48
7.2.60.0070.00416.68
7.2.00.0000.01419.13
7.1.200.0110.00315.71
7.1.100.0220.00917.79
7.1.70.0070.00417.00
7.1.60.0100.01319.46
7.1.50.0040.01816.46
7.1.00.0030.07722.42
7.0.200.0000.01016.70
7.0.140.0070.07022.22
7.0.60.0030.04019.86
7.0.50.0070.07717.86
7.0.40.0030.08020.08
7.0.30.0270.04020.08
7.0.20.0270.08020.12
7.0.10.0130.05020.12
7.0.00.0130.06720.10
5.6.280.0170.12385.75
5.6.210.0170.07085.15
5.6.200.0330.10082.81
5.6.190.0200.08785.03
5.6.180.0270.08385.11
5.6.170.0430.11784.88
5.6.160.0370.13084.97
5.6.150.0370.11782.64
5.6.140.0300.12082.79
5.6.130.0300.11782.80
5.6.120.0330.10085.55
5.6.110.0270.11385.75
5.6.100.0370.11785.60
5.6.90.0300.10785.64
5.6.80.0330.11785.04
5.5.350.0330.12384.94
5.5.340.0270.12382.54
5.5.330.0200.07784.81
5.5.320.0630.10384.88
5.5.310.0430.06784.77
5.5.300.0230.07382.59
5.5.290.0500.10782.64
5.5.280.0330.08385.44
5.5.270.0330.13085.44
5.5.260.0330.11785.38
5.5.250.0330.06785.34
5.5.240.0230.09384.98
5.4.450.0330.11384.04
5.4.440.0270.08784.00
5.4.430.0230.11783.98
5.4.420.0330.11383.99
5.4.410.0300.11083.87
5.4.400.0330.07783.71
5.4.390.0300.11083.68
5.4.380.0200.11083.57
5.4.370.0300.08783.67
5.4.360.0300.11083.58
5.4.350.0300.12083.57
5.4.340.0270.07083.57
5.4.320.0270.06783.89
5.4.310.0230.11083.58
5.4.300.0300.09083.66
5.4.290.0270.06783.80
5.4.280.0270.08383.70
5.4.270.0300.11083.67
5.4.260.0230.07383.66
5.4.250.0230.06383.65
5.4.240.0200.13083.64
5.4.230.0230.08383.70
5.4.220.0400.10783.56
5.4.210.0230.11083.81
5.4.200.0270.09083.52
5.4.190.0270.10083.51
5.4.180.0200.11083.53
5.4.170.0300.12783.80
5.4.160.0370.10383.47
5.4.150.0200.08383.68
5.4.140.0400.07081.09
5.4.130.0500.07380.94
5.4.120.0370.09080.95
5.4.110.0200.06781.19
5.4.100.0170.08381.10
5.4.90.0330.10381.02
5.4.80.0270.07081.08
5.4.70.0270.09080.88
5.4.60.0170.10781.02
5.4.50.0200.09380.79
5.4.40.0330.09381.05
5.4.30.0170.08381.15
5.4.20.0170.07081.07
5.4.10.0500.07780.87
5.4.00.0300.09380.39
5.3.290.0030.07714.59
5.3.280.0030.05014.76
5.3.270.0100.06314.55
5.3.260.0000.06014.62
5.3.250.0030.04714.54
5.3.240.0030.03714.68
5.3.230.0070.07014.54
5.3.220.0170.02314.59
5.3.210.0100.03014.48
5.3.200.0000.04314.59
5.3.190.0070.04714.59
5.3.180.0000.04314.48
5.3.170.0030.08014.65
5.3.160.0030.05014.62
5.3.150.0000.04014.54
5.3.140.0030.07314.64
5.3.130.0000.04014.71
5.3.120.0030.04314.55
5.3.110.0070.06014.56
5.3.100.0100.04014.16
5.3.90.0000.05713.92
5.3.80.0030.07013.93
5.3.70.0000.05314.00
5.3.60.0070.04014.25
5.3.50.0030.04013.99
5.3.40.0070.07313.88
5.3.30.0030.07313.84
5.3.20.0030.06313.84
5.3.10.0070.05713.84
5.3.00.0030.04013.84
5.2.170.0000.04313.84
5.2.160.0000.06713.84
5.2.150.0000.05313.84
5.2.140.0070.05313.84
5.2.130.0100.04013.84
5.2.120.0000.05313.84
5.2.110.0000.03713.84
5.2.100.0030.05713.84
5.2.90.0030.05713.84
5.2.80.0000.05013.84
5.2.70.0070.04713.84
5.2.60.0070.06313.84
5.2.50.0100.06013.84
5.2.40.0030.03313.84
5.2.30.0000.06713.84
5.2.20.0070.06313.84
5.2.10.0030.05013.84
5.2.00.0030.06313.84
5.1.60.0000.06013.84
5.1.50.0030.03013.84
5.1.40.0000.04713.84
5.1.30.0030.05713.84
5.1.20.0000.05713.84
5.1.10.0130.03013.84
5.1.00.0030.04013.84
5.0.50.0030.04313.84
5.0.40.0000.04713.84
5.0.30.0030.03713.84
5.0.20.0030.02013.84
5.0.10.0030.04713.84
5.0.00.0100.05713.84
4.4.90.0030.03313.84
4.4.80.0100.02713.84
4.4.70.0000.04013.84
4.4.60.0030.03313.84
4.4.50.0000.03313.84
4.4.40.0000.05713.84
4.4.30.0030.02013.84
4.4.20.0000.03313.84
4.4.10.0000.03713.84
4.4.00.0070.05013.84
4.3.110.0000.04013.84
4.3.100.0000.02013.84
4.3.90.0030.03313.84
4.3.80.0000.05013.84
4.3.70.0000.03713.84
4.3.60.0030.03013.84
4.3.50.0000.02713.84
4.3.40.0000.05313.84
4.3.30.0070.03313.84
4.3.20.0000.03713.84
4.3.10.0030.03713.84
4.3.00.0000.02713.84

preferences:
43.54 ms | 401 KiB | 5 Q