3v4l.org

run code in 300+ PHP versions simultaneously
<?php $it1 = new ArrayIterator(array(1,2,3)); $it2 = new ArrayIterator(array(4,5,6)); $multipleIterator = new MultipleIterator(); $multipleIterator->attachIterator($it1); $multipleIterator->attachIterator($it2, 'second'); foreach ($multipleIterator as $key => $value) { var_dump($key, $value); }

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.0130.00316.75
8.3.50.0060.01221.95
8.3.40.0070.00718.71
8.3.30.0100.00719.08
8.3.20.0100.00320.29
8.3.10.0040.00421.90
8.3.00.0080.00020.93
8.2.180.0030.01618.54
8.2.170.0090.00622.96
8.2.160.0100.01019.36
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0060.00317.93
8.2.110.0080.00322.25
8.2.100.0090.00317.75
8.2.90.0060.00319.21
8.2.80.0080.00017.97
8.2.70.0030.00617.60
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0030.00817.96
8.2.30.0030.00618.12
8.2.20.0070.00017.56
8.2.10.0050.00318.11
8.2.00.0000.00717.68
8.1.280.0100.00725.92
8.1.270.0080.00020.64
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00023.88
8.1.230.0060.00619.14
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00917.23
8.1.190.0090.00017.35
8.1.180.0030.00618.10
8.1.170.0000.00818.60
8.1.160.0000.00722.05
8.1.150.0070.00018.82
8.1.140.0080.00017.46
8.1.130.0030.00317.82
8.1.120.0030.00317.46
8.1.110.0000.00817.32
8.1.100.0050.00217.36
8.1.90.0000.00817.43
8.1.80.0080.00017.41
8.1.70.0030.00317.35
8.1.60.0040.00417.55
8.1.50.0050.00317.53
8.1.40.0000.00817.57
8.1.30.0000.00917.63
8.1.20.0000.00817.50
8.1.10.0000.00817.41
8.1.00.0050.00317.42
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0070.00018.38
8.0.270.0000.00717.32
8.0.260.0000.00717.14
8.0.250.0030.00316.85
8.0.240.0040.00416.98
8.0.230.0070.00016.90
8.0.220.0000.00716.84
8.0.210.0000.00816.77
8.0.200.0030.00316.84
8.0.190.0070.00016.87
8.0.180.0030.00516.81
8.0.170.0070.00016.95
8.0.160.0030.00316.89
8.0.150.0070.00016.80
8.0.140.0000.00716.86
8.0.130.0070.00013.27
8.0.120.0030.00516.86
8.0.110.0050.00216.75
8.0.100.0000.00816.86
8.0.90.0050.00316.82
8.0.80.0060.01116.84
8.0.70.0070.00016.94
8.0.60.0050.00316.86
8.0.50.0000.00716.80
8.0.30.0130.01116.95
8.0.20.0150.00517.40
8.0.10.0000.00717.04
8.0.00.0090.01216.88
7.4.330.0000.00715.03
7.4.320.0030.00316.58
7.4.300.0000.00616.51
7.4.290.0030.00316.51
7.4.280.0050.00616.60
7.4.270.0030.00316.62
7.4.260.0000.00716.57
7.4.250.0040.00416.42
7.4.240.0050.00216.46
7.4.230.0070.00016.67
7.4.220.0160.01016.38
7.4.210.0100.00616.56
7.4.200.0030.00316.62
7.4.160.0120.00416.42
7.4.150.0060.01317.40
7.4.140.0090.00917.86
7.4.130.0120.00716.41
7.4.120.0070.01116.48
7.4.110.0060.01516.35
7.4.100.0100.00716.53
7.4.90.0140.00316.45
7.4.80.0060.01216.30
7.4.70.0110.00716.31
7.4.60.0100.00616.52
7.4.50.0000.00816.31
7.4.40.0220.00016.38
7.4.30.0100.00916.44
7.4.00.0070.00714.79
7.3.330.0000.00512.97
7.3.320.0100.00313.09
7.3.310.0000.00716.21
7.3.300.0040.00416.30
7.3.290.0040.00416.27
7.3.280.0130.00616.27
7.3.270.0060.01217.40
7.3.260.0090.00916.49
7.3.250.0100.00716.24
7.3.240.0060.01616.40
7.3.230.0150.00316.39
7.3.210.0080.00816.36
7.3.200.0160.00619.39
7.3.190.0090.00916.14
7.3.180.0060.01016.39
7.3.170.0140.00816.27
7.3.160.0060.01716.27
7.2.330.0070.01516.64
7.2.320.0030.01416.55
7.2.310.0120.00616.48
7.2.300.0140.00616.57
7.2.290.0160.00616.50
7.2.60.0070.00716.84
7.2.00.0000.01219.29
7.1.200.0000.01015.60
7.1.100.0740.00415.77
7.1.70.0140.00716.98
7.1.60.0070.01719.46
7.1.50.0000.02216.85
7.1.00.0070.07022.41
7.0.200.0050.00914.71
7.0.140.0070.06022.09
7.0.60.0100.06719.92
7.0.50.0070.08017.88
7.0.40.0030.06020.11
7.0.30.0300.03720.20
7.0.20.0230.04320.16
7.0.10.0300.04320.16
7.0.00.0000.09020.09
5.6.280.0070.07020.91
5.6.210.0130.03720.70
5.6.200.0000.04718.20
5.6.190.0170.07720.41
5.6.180.0030.05320.56
5.6.170.0370.07020.62
5.6.160.0100.07320.49
5.6.150.0070.07718.11
5.6.140.0200.07018.21
5.6.130.0030.05318.12
5.6.120.0030.04321.03
5.6.110.0130.08020.98
5.6.100.0070.04721.01
5.6.90.0030.07320.97
5.6.80.0100.03320.38
5.6.70.4500.04320.36
5.5.350.0030.07720.52
5.5.340.0070.03717.99
5.5.330.0130.04720.37
5.5.320.0370.07020.28
5.5.310.0270.06020.17
5.5.300.0130.06018.02
5.5.290.0170.08017.95
5.5.280.0030.08020.68
5.5.270.0070.03720.76
5.5.260.0130.07720.89
5.5.250.0100.07320.78
5.5.240.0170.07320.17
5.4.450.0700.05019.59
5.4.440.0870.06319.63
5.4.430.1030.08319.46
5.4.420.0930.06019.10
5.4.410.1070.04719.47
5.4.400.0730.06319.13
5.4.390.0170.05318.59
5.4.380.0170.06718.72
5.4.370.0270.04318.68
5.4.360.0170.06718.68
5.4.350.0270.06718.72
5.4.340.0330.05018.65
5.4.320.0170.06318.68
5.4.310.0200.05718.70
5.4.300.0170.07018.58
5.4.290.0230.05718.72
5.4.280.0270.06318.65
5.4.270.0300.06318.71
5.4.260.0170.05718.67
5.4.250.0300.05318.50
5.4.240.0200.06318.45
5.4.230.0270.04718.64
5.4.220.0170.06718.67
5.4.210.0170.07318.45
5.4.200.0170.06016.40
5.4.190.0170.05318.74
5.4.180.0130.06718.49
5.4.170.0230.07018.50
5.4.160.0200.07018.48
5.4.150.0200.06718.70
5.4.140.0170.07016.33
5.4.130.0230.05716.27
5.4.120.0100.07316.23
5.4.110.0230.05716.30
5.4.100.0100.06016.23
5.4.90.0170.07016.30
5.4.80.0200.06316.23
5.4.70.0230.05016.24
5.4.60.0270.04016.02
5.4.50.0270.06716.08
5.4.40.0270.06316.14
5.4.30.0100.05716.28
5.4.20.0170.05016.16
5.4.10.0200.05316.23
5.4.00.0130.07015.54
5.3.290.0130.06314.70
5.3.280.0200.05014.63
5.3.270.0200.05014.58
5.3.260.0200.04714.59
5.3.250.0130.05314.71
5.3.240.0130.07314.66
5.3.230.0270.06014.55
5.3.220.0200.06014.57
5.3.210.0200.05714.48
5.3.200.0130.06014.56
5.3.190.0100.06014.48
5.3.180.0130.05314.59
5.3.170.0230.05314.47
5.3.160.0230.06014.64
5.3.150.0270.05314.56
5.3.140.0200.06314.63
5.3.130.0130.07714.53
5.3.120.0070.06314.45
5.3.110.0130.05314.48
5.3.100.0100.06014.08
5.3.90.0130.07714.11
5.3.80.0100.07014.00
5.3.70.0070.07013.99
5.3.60.0070.05714.03
5.3.50.0100.06013.88
5.3.40.0030.06013.86
5.3.30.0170.05014.02
5.3.20.0200.05013.68
5.3.10.0130.05313.64
5.3.00.0070.06713.58
5.2.170.0130.05711.11
5.2.160.0200.03311.29
5.2.150.0200.05011.11
5.2.140.0170.05311.27
5.2.130.0100.06011.01
5.2.120.0230.04711.01
5.2.110.0130.05311.23
5.2.100.0170.05311.07
5.2.90.0170.04711.14
5.2.80.0030.06011.13
5.2.70.0100.05311.05
5.2.60.0070.06011.09
5.2.50.0130.05310.97
5.2.40.0100.04311.14
5.2.30.0170.05010.95
5.2.20.0070.05011.01
5.2.10.0130.03710.90
5.2.00.0130.05310.72
5.1.60.0130.0439.95
5.1.50.0130.03010.01
5.1.40.0100.04310.00
5.1.30.0070.04710.32
5.1.20.0070.04010.40
5.1.10.0130.04710.10
5.1.00.0130.05010.06
5.0.50.0100.0378.61
5.0.40.0100.0338.45
5.0.30.0030.0638.27
5.0.20.0070.0378.37
5.0.10.0070.0408.17
5.0.00.0200.0408.26
4.4.90.0100.0275.82
4.4.80.0000.0375.86
4.4.70.0100.0275.93
4.4.60.0070.0275.86
4.4.50.0100.0235.82
4.4.40.0000.0505.82
4.4.30.0070.0275.95
4.4.20.0100.0275.94
4.4.10.0030.0335.96
4.4.00.0070.0435.89
4.3.110.0070.0305.83
4.3.100.0030.0305.85
4.3.90.0070.0275.83
4.3.80.0100.0405.81
4.3.70.0030.0305.89
4.3.60.0000.0335.89
4.3.50.0100.0275.91
4.3.40.0070.0435.74
4.3.30.0000.0304.54
4.3.20.0070.0234.57
4.3.10.0030.0304.54
4.3.00.0230.03014.62

preferences:
66.09 ms | 401 KiB | 5 Q