3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 0 => array( 0 => 1, ), 1 => array( 0 => 2, ), 2 => array( 0 => 3, 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.130.0070.01316.50
8.3.120.0050.00319.06
8.3.110.0150.00020.94
8.3.100.0070.01016.72
8.3.90.0070.00326.77
8.3.80.0090.00016.63
8.3.70.0120.00916.63
8.3.60.0040.01118.42
8.3.50.0110.00822.02
8.3.40.0120.00618.52
8.3.30.0110.00418.32
8.3.20.0030.00518.65
8.3.10.0030.00521.05
8.3.00.0070.00021.63
8.2.250.0030.00622.17
8.2.240.0060.00316.93
8.2.230.0090.00022.58
8.2.220.0040.00424.06
8.2.210.0110.00726.77
8.2.200.0000.00916.63
8.2.190.0090.00916.63
8.2.180.0070.00716.32
8.2.170.0140.00022.96
8.2.160.0070.00720.51
8.2.150.0050.00224.18
8.2.140.0050.00224.66
8.2.130.0050.00319.82
8.2.120.0040.00426.35
8.2.110.0040.00420.51
8.2.100.0000.01217.78
8.2.90.0040.00419.23
8.2.80.0040.00417.97
8.2.70.0080.00317.50
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0000.00818.03
8.2.30.0000.00721.22
8.2.20.0080.00017.60
8.2.10.0070.00017.64
8.2.00.0040.00717.79
8.1.300.0090.00917.89
8.1.290.0030.00630.84
8.1.280.0080.00625.92
8.1.270.0030.00523.99
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0050.00522.41
8.1.230.0070.00420.75
8.1.220.0030.00518.77
8.1.210.0000.00818.89
8.1.200.0030.00617.23
8.1.190.0090.00019.19
8.1.180.0080.00018.10
8.1.170.0030.00518.59
8.1.160.0040.00418.93
8.1.150.0050.00218.63
8.1.140.0000.00717.43
8.1.130.0040.00417.50
8.1.120.0000.01017.37
8.1.110.0030.00617.36
8.1.100.0000.00817.45
8.1.90.0040.00417.41
8.1.80.0030.00517.50
8.1.70.0070.00017.43
8.1.60.0040.00417.57
8.1.50.0000.00817.36
8.1.40.0040.00417.57
8.1.30.0040.00417.63
8.1.20.0080.00017.53
8.1.10.0000.00817.50
8.1.00.0030.00717.39
8.0.300.0000.00719.89
8.0.290.0050.00317.04
8.0.280.0030.00318.43
8.0.270.0000.00816.69
8.0.260.0000.00716.80
8.0.250.0080.00016.98
8.0.240.0070.00416.92
8.0.230.0040.00316.91
8.0.220.0030.00316.91
8.0.210.0030.00316.88
8.0.200.0000.00616.87
8.0.190.0000.00716.93
8.0.180.0070.00016.82
8.0.170.0000.00916.83
8.0.160.0000.00816.83
8.0.150.0000.00716.80
8.0.140.0000.00816.76
8.0.130.0070.00013.31
8.0.120.0000.00816.86
8.0.110.0040.00416.83
8.0.100.0030.00316.91
8.0.90.0000.00716.83
8.0.80.0000.01516.84
8.0.70.0050.00216.71
8.0.60.0040.00416.87
8.0.50.0000.00816.75
8.0.30.0140.00716.98
8.0.20.0140.00617.40
8.0.10.0040.00417.04
8.0.00.0080.01016.75
7.4.330.0030.00314.80
7.4.320.0030.00716.52
7.4.300.0040.00416.55
7.4.290.0000.00716.39
7.4.280.0050.00216.55
7.4.270.0070.00016.52
7.4.260.0070.00016.49
7.4.250.0000.00816.45
7.4.240.0000.00716.57
7.4.230.0030.00316.70
7.4.220.0070.01316.52
7.4.210.0130.00516.52
7.4.200.0000.00716.64
7.4.190.0040.00416.68
7.4.160.0060.00916.22
7.4.150.0110.00617.40
7.4.140.0070.01017.86
7.4.130.0110.00616.35
7.4.120.0090.01016.49
7.4.110.0150.00616.48
7.4.100.0090.00916.48
7.4.90.0130.01016.45
7.4.80.0110.01119.39
7.4.70.0100.00716.28
7.4.60.0070.01016.46
7.4.50.0000.00816.51
7.4.40.0090.00522.52
7.4.30.0090.00916.35
7.4.00.0060.01114.89
7.3.330.0060.00013.14
7.3.320.0000.00613.13
7.3.310.0000.00716.31
7.3.300.0000.00816.25
7.3.290.0060.01316.29
7.3.280.0040.01116.24
7.3.270.0100.00717.40
7.3.260.0140.00818.24
7.3.250.0130.00716.27
7.3.240.0120.00616.37
7.3.230.0160.00316.55
7.3.210.0180.00416.47
7.3.200.0130.00819.39
7.3.190.0110.00716.64
7.3.180.0100.00916.56
7.3.170.0160.00716.68
7.3.160.0100.00716.52
7.3.120.0080.00914.85
7.3.110.0050.01314.92
7.3.100.0060.00914.87
7.3.90.0040.00814.63
7.3.80.0050.00814.75
7.3.70.0080.00814.71
7.3.60.0050.00714.86
7.3.50.0050.00814.73
7.3.40.0050.01114.74
7.3.30.0040.00714.83
7.3.20.0060.00716.70
7.3.10.0050.00916.70
7.3.00.0050.00616.71
7.2.330.0090.00916.69
7.2.320.0090.00916.73
7.2.310.0140.00416.61
7.2.300.0070.00716.41
7.2.290.0100.01316.66
7.2.250.0060.01015.02
7.2.240.0090.01015.02
7.2.230.0030.01015.03
7.2.220.0020.01015.15
7.2.210.0060.00815.12
7.2.200.0060.00515.07
7.2.190.0080.00615.03
7.2.180.0070.00714.94
7.2.170.0070.00814.99
7.2.130.0070.00716.81
7.2.120.0070.00716.76
7.2.110.0030.00916.91
7.2.100.0060.00617.07
7.2.90.0000.01216.94
7.2.80.0080.00417.05
7.2.70.0090.00616.99
7.2.60.0070.00716.76
7.2.50.0030.00917.03
7.2.40.0030.00617.07
7.2.30.0040.00816.91
7.2.20.0060.00916.90
7.2.10.0030.01017.13
7.2.00.0110.01018.12
7.1.330.0060.00915.83
7.1.320.0030.00915.71
7.1.310.0040.00915.74
7.1.300.0020.01115.73
7.1.290.0070.00715.74
7.1.280.0060.00715.79
7.1.270.0080.00515.72
7.1.260.0090.00615.75
7.1.250.0000.01215.86
7.1.200.0100.00315.94
7.1.100.0000.01218.45
7.1.70.0060.00917.32
7.1.60.0070.01719.40
7.1.50.0060.01616.96
7.1.00.0000.03722.48
7.0.200.3330.00316.52
7.0.140.0070.06022.09
7.0.70.0070.07021.77
7.0.60.0030.07321.70
7.0.50.0030.08322.14
7.0.40.0100.08020.02
7.0.30.0100.07020.13
7.0.20.0000.06320.07
7.0.10.0000.05320.11
7.0.00.0030.07719.98
5.6.280.0030.07721.09
5.6.220.0030.06720.68
5.6.210.0030.08320.61
5.6.200.0100.07720.92
5.6.190.0030.08720.99
5.6.180.0070.07721.15
5.6.170.0070.07321.10
5.6.160.0130.07321.09
5.6.150.0000.08320.93
5.6.140.0100.03720.93
5.6.130.0000.04721.04
5.6.120.0000.03721.00
5.6.110.0000.04321.05
5.6.100.0030.03721.03
5.6.90.0000.04320.98
5.6.80.0000.04020.43
5.6.70.0030.04720.36
5.6.60.0030.08020.31
5.6.50.0000.07020.39
5.6.40.0030.07720.38
5.6.30.0000.07320.45
5.6.20.0000.07320.30
5.6.10.0000.05020.40
5.6.00.0030.04020.43
5.5.360.0030.08320.43
5.5.350.0000.08320.37
5.5.340.0070.08320.88
5.5.330.0070.08320.72
5.5.320.0100.04720.91
5.5.310.0030.08320.91
5.5.300.0100.08020.74
5.5.290.0000.04320.77
5.5.280.0030.04020.78
5.5.270.0030.04020.77
5.5.260.0000.03320.73
5.5.250.0030.04020.72
5.5.240.0070.03320.24
5.5.230.0030.04320.24
5.5.220.0030.07320.13
5.5.210.0030.04320.29
5.5.200.0000.08020.21
5.5.190.0030.09320.21
5.5.180.0170.06720.19
5.5.160.0000.04320.14
5.5.150.0070.03320.20
5.5.140.0070.04320.22
5.5.130.0070.05020.23
5.5.120.0000.04320.23
5.5.110.0000.04020.15
5.5.100.0030.04020.05
5.5.90.0030.03020.07
5.5.80.0000.03320.13
5.5.70.0070.02720.12
5.5.60.0000.03320.07
5.5.50.0000.03319.95
5.5.40.0030.03020.08
5.5.30.0000.03719.91
5.5.20.0030.03320.06
5.5.10.0070.03720.06
5.5.00.0030.03020.09
5.4.450.0000.04019.36
5.4.440.0000.04319.26
5.4.430.0000.03719.43
5.4.420.0030.03019.25
5.4.410.0030.04019.40
5.4.400.0030.04319.21
5.4.390.0070.06019.03
5.4.380.0000.07719.08
5.4.370.0030.06719.02
5.4.360.0000.08319.08
5.4.350.0000.04319.05
5.4.340.0000.04319.14
5.4.320.0100.04719.11
5.4.310.0100.04318.89
5.4.300.0000.04019.02
5.4.290.0000.03719.04
5.4.280.0000.05319.13
5.4.270.0030.03718.93
5.4.260.0100.03319.10
5.4.250.0030.03718.86
5.4.240.0000.03719.08
5.4.230.0000.03019.08
5.4.220.0030.03019.00
5.4.210.0000.03019.10
5.4.200.0070.02719.10
5.4.190.0030.02718.76
5.4.180.0000.04018.93
5.4.170.0000.03019.12
5.4.160.0000.03019.09
5.4.150.0000.03018.75
5.4.140.0000.03016.23
5.4.130.0000.03016.20
5.4.120.0000.03016.05
5.4.110.0100.02716.20
5.4.100.0030.02716.38
5.4.90.0000.03016.43
5.4.80.0000.03016.41
5.4.70.0000.03016.38
5.4.60.0030.02716.34
5.4.50.0000.03016.23
5.4.40.0030.03316.46
5.4.30.0070.04016.36
5.4.20.0070.06716.19
5.4.10.0070.04016.19
5.4.00.0030.07315.70
5.3.290.0030.03714.86
5.3.280.0000.04014.86
5.3.270.0000.03014.86
5.3.260.0000.03314.86
5.3.250.0000.03014.86
5.3.240.0030.02714.86
5.3.230.0030.02714.86
5.3.220.0000.03014.86
5.3.210.0030.03714.86
5.3.200.0000.03014.86
5.3.190.0030.03314.86
5.3.180.0000.03014.86
5.3.170.0000.03014.86
5.3.160.0000.03314.86
5.3.150.0000.04014.86
5.3.140.0030.02714.86
5.3.130.0000.03714.86
5.3.120.0000.05314.86
5.3.110.0030.06714.86
5.3.100.0000.07014.86
5.3.90.0100.06014.86
5.3.80.0070.07014.86
5.3.70.0030.07714.86
5.3.60.0000.07314.86
5.3.50.0100.07014.86
5.3.40.0030.07714.86
5.3.30.0070.05314.86
5.3.20.0070.04714.86
5.3.10.0070.07014.86
5.3.00.0000.06714.86
5.2.170.0000.07014.86
5.2.160.0000.06314.86
5.2.150.0000.06314.86
5.2.140.0030.03014.86
5.2.130.0030.06314.86
5.2.120.0000.06314.86
5.2.110.0000.06714.86
5.2.100.0100.06014.86
5.2.90.0100.05014.86
5.2.80.0000.05714.86
5.2.70.0070.06014.86
5.2.60.0030.06314.86
5.2.50.0030.06014.86
5.2.40.0030.05714.86
5.2.30.0000.05014.86
5.2.20.0030.05714.86
5.2.10.0100.07014.86
5.2.00.0030.05714.86
5.1.60.0030.05714.86
5.1.50.0000.05314.86
5.1.40.0000.05314.86
5.1.30.0030.04714.86
5.1.20.0100.04314.86
5.1.10.0100.04714.86
5.1.00.0070.03714.86
5.0.50.0000.04014.86
5.0.40.0030.04014.86
5.0.30.0170.05014.86
5.0.20.0030.03714.86
5.0.10.0030.02714.86
5.0.00.0070.05014.86
4.4.90.0030.03314.86
4.4.80.0000.03714.86
4.4.70.0070.02714.86
4.4.60.0000.03014.86
4.4.50.0000.03714.86
4.4.40.0030.03314.86
4.4.30.0000.03014.86
4.4.20.0070.03014.86
4.4.10.0000.03314.86
4.4.00.0000.05014.86
4.3.110.0000.04014.86
4.3.100.0000.03314.86
4.3.90.0000.02714.86
4.3.80.0000.03314.86
4.3.70.0000.03714.86
4.3.60.0070.03014.86
4.3.50.0070.03014.86
4.3.40.0000.05714.86
4.3.30.0030.03314.86
4.3.20.0070.03014.86
4.3.10.0030.03014.86
4.3.00.0000.03714.86

preferences:
31.31 ms | 403 KiB | 5 Q