3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 0 => array( 0 => 1, ), 1 => array( 0 => 2, ), 2 => array( 0 => 17, 1 => 4, 2 => 5, ), 3 => array( 0 => 6, ), 4 => array( 0 => 7, ), ); $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($data)); echo PHP_EOL, implode(iterator_to_array($it)); //745 instead of 1234567 echo PHP_EOL, implode(iterator_to_array($it, true)); //745 instead of 1234567 echo PHP_EOL ; foreach($it as $v) { echo $v ; }

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.0110.00416.63
8.3.50.0060.01417.37
8.3.40.0040.01118.59
8.3.30.0070.00718.52
8.3.20.0060.00318.48
8.3.10.0080.00020.47
8.3.00.0040.00417.38
8.2.180.0060.00916.75
8.2.170.0080.00622.96
8.2.160.0070.00722.09
8.2.150.0030.00624.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00419.83
8.2.110.0150.00321.13
8.2.100.0000.01217.91
8.2.90.0040.00419.18
8.2.80.0050.00318.04
8.2.70.0050.00517.63
8.2.60.0030.00618.03
8.2.50.0050.00318.07
8.2.40.0000.00818.22
8.2.30.0040.00417.99
8.2.20.0070.00017.57
8.2.10.0060.00319.58
8.2.00.0030.00717.66
8.1.280.0160.00625.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0000.01020.80
8.1.230.0040.00820.89
8.1.220.0000.00818.77
8.1.210.0040.00418.86
8.1.200.0090.00017.36
8.1.190.0040.00417.50
8.1.180.0040.00418.10
8.1.170.0080.00018.96
8.1.160.0000.00818.90
8.1.150.0040.00418.59
8.1.140.0040.00417.39
8.1.130.0000.00717.85
8.1.120.0040.00417.47
8.1.110.0040.00417.42
8.1.100.0040.00417.44
8.1.90.0000.00817.33
8.1.80.0040.00417.45
8.1.70.0050.00317.36
8.1.60.0040.00417.45
8.1.50.0000.00817.33
8.1.40.0040.00417.54
8.1.30.0000.00717.64
8.1.20.0000.00817.64
8.1.10.0050.00317.45
8.1.00.0070.00017.46
8.0.300.0070.00019.98
8.0.290.0050.00216.63
8.0.280.0030.00318.31
8.0.270.0000.00717.19
8.0.260.0000.00816.82
8.0.250.0040.00416.93
8.0.240.0060.00616.97
8.0.230.0030.00316.89
8.0.220.0030.00316.89
8.0.210.0040.00416.87
8.0.200.0030.00316.92
8.0.190.0070.00016.98
8.0.180.0050.00216.95
8.0.170.0060.00316.80
8.0.160.0000.00716.77
8.0.150.0040.00416.82
8.0.140.0040.00416.85
8.0.130.0030.00313.34
8.0.120.0000.00716.73
8.0.110.0050.00216.92
8.0.100.0030.00516.75
8.0.90.0040.00316.84
8.0.80.0130.00316.87
8.0.70.0040.00416.91
8.0.60.0050.00216.81
8.0.50.0040.00416.91
8.0.30.0110.01117.31
8.0.20.0090.01017.06
8.0.10.0020.00517.01
8.0.00.0100.01216.84
7.4.330.0020.00212.97
7.4.320.0060.00016.60
7.4.300.0000.00716.61
7.4.290.0060.00016.52
7.4.280.0040.00416.54
7.4.270.0030.00316.60
7.4.260.0030.00313.21
7.4.250.0100.00016.60
7.4.240.0040.00416.35
7.4.230.0050.00216.24
7.4.220.0120.01216.47
7.4.210.0080.00716.52
7.4.200.0030.00316.29
7.4.190.0070.00016.59
7.4.160.0080.00816.55
7.4.150.0130.00416.66
7.4.140.0100.01016.41
7.4.130.0080.00916.52
7.4.120.0120.00516.56
7.4.110.0130.00316.30
7.4.100.0100.01316.39
7.4.90.0120.00416.40
7.4.80.0070.01016.38
7.4.70.0130.00916.34
7.4.60.0140.00616.45
7.4.50.0060.00316.56
7.4.40.0090.00616.27
7.4.30.0080.00716.30
7.4.00.0060.01014.82
7.3.330.0000.00613.15
7.3.320.0030.00313.11
7.3.310.0070.00016.36
7.3.300.0030.00316.16
7.3.290.0090.00616.29
7.3.280.0090.00816.27
7.3.270.0140.00416.24
7.3.260.0130.00816.39
7.3.250.0060.01416.40
7.3.240.0170.00316.58
7.3.230.0130.00316.28
7.3.210.0080.00816.43
7.3.200.0070.01319.39
7.3.190.0030.02116.52
7.3.180.0130.01016.32
7.3.170.0060.01016.32
7.3.160.0120.00416.57
7.3.120.0060.00615.04
7.2.330.0130.00616.70
7.2.320.0100.00616.50
7.2.310.0130.00916.82
7.2.300.0150.00616.48
7.2.290.0060.01216.77
7.1.70.0000.00717.10
7.1.60.0070.01719.40
7.1.50.0100.01317.14
7.1.00.0030.07022.44
7.0.200.0070.00316.98
7.0.140.0000.07722.04
7.0.120.0100.06722.02
7.0.60.0070.08319.82
7.0.50.0070.06017.91
7.0.40.0000.06019.96
7.0.30.0200.04320.00
7.0.20.0230.08320.13
7.0.10.0270.06020.20
7.0.00.0030.07020.18
5.6.280.0030.07320.77
5.6.210.0030.06320.76
5.6.200.0100.06718.21
5.6.190.0130.07720.45
5.6.180.0230.04320.57
5.6.170.0200.07320.41
5.6.160.0130.03320.54
5.6.150.0130.03318.11
5.6.140.0030.04318.21
5.6.130.0000.05718.18
5.6.120.0100.08020.99
5.6.110.0200.03721.02
5.6.100.0070.03721.00
5.6.90.0030.09020.98
5.6.80.0100.08320.28
5.6.70.3700.03720.43
5.5.350.0430.06720.41
5.5.340.0100.04717.92
5.5.330.0000.07320.29
5.5.320.0270.06020.21
5.5.310.0300.07320.16
5.5.300.0030.08017.98
5.5.290.0030.04317.96
5.5.280.0100.08320.76
5.5.270.0130.08020.76
5.5.260.0000.04320.76
5.5.250.0100.07720.54
5.5.240.0070.06020.27
5.4.450.0070.04319.11
5.4.440.0030.04019.10
5.4.430.0030.05319.47
5.4.420.0100.05019.32
5.4.410.0030.04319.31
5.4.400.0070.07719.01
5.4.390.0030.09018.79
5.4.380.0030.06019.18
5.4.370.0030.03718.79
5.4.360.0030.06718.89
5.4.350.0070.04719.00
5.4.340.0100.07319.17
5.4.320.0070.04018.80
5.4.310.0170.06718.92
5.4.300.0100.05719.09
5.4.290.0070.06018.77
5.4.280.0100.04319.14
5.4.270.0170.06719.00
5.4.260.0070.06719.08
5.4.250.0070.06319.11
5.4.240.0000.04319.07
5.4.230.0100.07018.91
5.4.220.0070.07718.93
5.4.210.0070.05019.13
5.4.200.0130.04018.80
5.4.190.0070.03718.78
5.4.180.0030.04319.13
5.4.170.0030.06718.77
5.4.160.0100.06319.13
5.4.150.0100.05018.89
5.4.140.0070.03316.17
5.4.130.0030.05716.24
5.4.120.0030.03716.25
5.4.110.0070.07316.15
5.4.100.0030.07716.37
5.4.90.0070.07016.35
5.4.80.0030.03716.59
5.4.70.0100.06316.26
5.4.60.0070.05016.32
5.4.50.0030.04316.63
5.4.40.0070.04316.37
5.4.30.0000.08016.21
5.4.20.0030.03716.24
5.4.10.0030.06316.27
5.4.00.0070.05015.70
5.3.290.0000.05314.46
5.3.280.0070.04714.41
5.3.270.0000.05314.55
5.3.260.0070.04314.43
5.3.250.0000.04714.50
5.3.240.0000.04014.70
5.3.230.0100.03314.69
5.3.220.0070.03314.45
5.3.210.0100.07014.49
5.3.200.0070.05714.50
5.3.190.0030.05314.47
5.3.180.0030.04014.66
5.3.170.0100.07014.49
5.3.160.0130.06714.51
5.3.150.0070.07014.49
5.3.140.0000.07014.57
5.3.130.0000.05314.48
5.3.120.0070.03714.48
5.3.110.0070.07314.56
5.3.100.0130.07713.94
5.3.90.0070.04013.96
5.3.80.0070.03013.95
5.3.70.0000.07013.86
5.3.60.0030.03713.93
5.3.50.0030.04713.87
5.3.40.0030.04713.91
5.3.30.0000.04013.73
5.3.20.0100.06713.63
5.3.10.0000.08013.68
5.3.00.0030.03713.62
5.2.170.0070.06011.08
5.2.160.0070.04310.98
5.2.150.0070.03011.13
5.2.140.0030.03011.23
5.2.130.0070.03311.04
5.2.120.0000.03311.09
5.2.110.0100.04011.11
5.2.100.0070.04310.96
5.2.90.0000.04711.07
5.2.80.0100.02310.96
5.2.70.0230.04311.04
5.2.60.0070.03011.02
5.2.50.0030.06311.00
5.2.40.0070.03010.94
5.2.30.0000.06710.94
5.2.20.0070.05310.88
5.2.10.0030.04710.91
5.2.00.0070.04010.71
5.1.60.0000.03710.05
5.1.50.0030.0539.96
5.1.40.0070.05010.12
5.1.30.0130.04710.34
5.1.20.0030.05010.31
5.1.10.0000.0339.97
5.1.00.0000.02710.04
5.0.50.0100.0208.63
5.0.40.0000.0308.47
5.0.30.0000.0478.23
5.0.20.0030.0238.16
5.0.10.0000.0478.09
5.0.00.0030.0638.13
4.4.90.0000.0277.96
4.4.80.0030.0337.96
4.4.70.0030.0207.96
4.4.60.0000.0237.96
4.4.50.0000.0237.96
4.4.40.0000.0537.96
4.4.30.0030.0307.96
4.4.20.0030.0177.96
4.4.10.0000.0207.96
4.4.00.0070.0507.96
4.3.110.0000.0177.96
4.3.100.0000.0307.96
4.3.90.0030.0237.96
4.3.80.0030.0437.96
4.3.70.0030.0207.96
4.3.60.0070.0177.96
4.3.50.0030.0137.96
4.3.40.0030.0437.96
4.3.30.0000.0277.96
4.3.20.0070.0337.96
4.3.10.0030.0277.96
4.3.00.0000.0307.96

preferences:
36.57 ms | 401 KiB | 5 Q