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)); var_dump($lt); 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.0120.00818.56
8.3.50.0090.01021.09
8.3.40.0000.01518.79
8.3.30.0070.01020.30
8.3.20.0030.00620.13
8.3.10.0070.00721.98
8.3.00.0030.00622.31
8.2.180.0040.01516.75
8.2.170.0100.01022.96
8.2.160.0140.00022.07
8.2.150.0090.00024.18
8.2.140.0070.00024.66
8.2.130.0100.01026.16
8.2.120.0060.00320.88
8.2.110.0030.00722.11
8.2.100.0120.00017.75
8.2.90.0060.00317.63
8.2.80.0000.00917.97
8.2.70.0030.00617.93
8.2.60.0030.00618.05
8.2.50.0050.00318.10
8.2.40.0000.00820.66
8.2.30.0060.00319.54
8.2.20.0070.00017.68
8.2.10.0030.00517.79
8.2.00.0080.00017.76
8.1.270.0130.00323.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.81
8.1.230.0070.00719.08
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0030.00617.10
8.1.180.0050.00318.10
8.1.170.0060.00318.57
8.1.160.0040.00418.79
8.1.150.0030.00618.54
8.1.140.0000.00717.46
8.1.130.0030.00517.75
8.1.120.0070.00017.47
8.1.110.0000.00717.45
8.1.100.0030.00517.52
8.1.90.0040.00417.38
8.1.80.0040.00417.36
8.1.70.0030.00317.48
8.1.60.0000.00817.56
8.1.50.0040.00417.39
8.1.40.0030.00517.41
8.1.30.0040.00417.62
8.1.20.0030.00617.61
8.1.10.0070.00017.57
8.1.00.0030.00517.36
8.0.300.0050.00319.70
8.0.290.0040.00416.88
8.0.280.0030.00318.36
8.0.270.0040.00417.25
8.0.260.0030.00316.89
8.0.250.0030.00317.07
8.0.240.0030.00617.02
8.0.230.0040.00417.00
8.0.220.0030.00316.84
8.0.210.0050.00316.98
8.0.200.0030.00316.99
8.0.190.0040.00416.95
8.0.180.0030.00517.00
8.0.170.0030.00516.88
8.0.160.0040.00416.92
8.0.150.0000.00716.97
8.0.140.0000.00816.93
8.0.130.0040.00413.38
8.0.120.0000.00816.88
8.0.110.0030.00616.89
8.0.100.0030.00517.02
8.0.90.0040.00416.95
8.0.80.0060.00917.00
8.0.70.0040.00416.79
8.0.60.0040.00416.84
8.0.50.0030.00516.87
8.0.30.0120.00716.97
8.0.20.0160.00817.40
8.0.10.0070.00017.04
8.0.00.0160.00416.55
7.4.330.0060.00015.00
7.4.320.0030.00316.49
7.4.300.0030.00316.51
7.4.290.0000.00716.56
7.4.280.0030.00316.50
7.4.270.0070.00016.46
7.4.260.0050.00013.26
7.4.250.0040.00416.46
7.4.240.0050.00216.57
7.4.230.0000.00716.41
7.4.220.0150.01116.52
7.4.210.0070.00916.54
7.4.200.0040.00416.30
7.4.190.0050.00216.40
7.4.160.0080.00816.70
7.4.150.0040.01417.40
7.4.140.0100.01417.86
7.4.130.0060.01016.47
7.4.120.0090.01116.55
7.4.110.0120.00416.45
7.4.100.0160.00916.59
7.4.90.0140.00316.43
7.4.80.0150.00719.39
7.4.70.0140.00716.41
7.4.60.0080.00816.29
7.4.50.0040.00416.73
7.4.40.0070.00422.77
7.4.30.0100.01316.57
7.4.00.0070.00314.94
7.3.330.0000.00513.25
7.3.320.0030.00313.20
7.3.310.0060.00016.25
7.3.300.0030.00316.35
7.3.290.0060.01316.30
7.3.280.0110.00716.39
7.3.270.0060.01217.40
7.3.260.0070.01116.60
7.3.250.0070.01016.58
7.3.240.0060.01016.35
7.3.230.0110.00616.60
7.3.210.0070.01016.36
7.3.200.0150.00719.39
7.3.190.0150.00316.40
7.3.180.0090.00916.30
7.3.170.0090.00616.48
7.3.160.0120.00316.51
7.3.120.0060.01015.08
7.2.330.0130.00416.58
7.2.320.0080.01216.77
7.2.310.0130.00616.82
7.2.300.0040.01416.49
7.2.290.0030.01316.77
7.2.60.0100.00316.75
7.2.00.0040.00719.10
7.1.200.0060.00615.80
7.1.100.0040.01118.16
7.1.70.0000.00817.25
7.1.60.0070.01719.32
7.1.50.0090.01516.98
7.1.00.0000.03722.46
7.0.200.0000.00716.52
7.0.140.0000.07722.00
7.0.70.0030.09021.61
7.0.60.0030.08721.77
7.0.50.0030.08722.12
7.0.40.0030.06020.13
7.0.30.0070.07020.04
7.0.20.0100.03320.01
7.0.10.0030.04020.08
7.0.00.0030.08020.03
5.6.280.0130.06020.85
5.6.220.0030.08720.64
5.6.210.0070.08320.62
5.6.200.0030.06020.93
5.6.190.0000.05720.95
5.6.180.0000.05020.95
5.6.170.0030.04021.03
5.6.160.0070.04721.17
5.6.150.0000.04321.17
5.6.140.0030.04021.01
5.6.130.0000.04321.05
5.6.120.0070.04021.17
5.6.110.0030.06321.01
5.6.100.0030.04020.91
5.6.90.0030.04021.05
5.6.80.0070.04020.41
5.6.70.0030.03720.38
5.6.60.0030.04320.32
5.6.50.0000.04720.42
5.6.40.0030.05020.29
5.6.30.0000.04020.46
5.6.20.0000.04020.38
5.6.10.0030.03720.29
5.6.00.0030.03720.29
5.5.360.0030.08020.36
5.5.350.0100.08320.46
5.5.340.0030.05320.79
5.5.330.0030.05720.73
5.5.320.0100.06020.64
5.5.310.0030.04020.82
5.5.300.0000.04320.92
5.5.290.0000.05020.87
5.5.280.0030.04020.80
5.5.270.0030.04020.86
5.5.260.0070.04320.91
5.5.250.0070.03720.57
5.5.240.0070.04720.27
5.5.230.0030.04020.27
5.5.220.0000.04020.13
5.5.210.0030.05320.26
5.5.200.0030.03720.21
5.5.190.0000.04020.23
5.5.180.0030.04020.27
5.5.160.0030.03020.10
5.5.150.0000.04020.10
5.5.140.0030.03720.22
5.5.130.0030.03020.10
5.5.120.0000.04720.09
5.5.110.0000.04320.22
5.5.100.0030.03720.07
5.5.90.0030.04020.05
5.5.80.0000.04720.11
5.5.70.0030.03020.14
5.5.60.0000.03319.93
5.5.50.0000.04319.95
5.5.40.0030.03720.13
5.5.30.0000.05320.08
5.5.20.0030.07720.04
5.5.10.0100.04320.13
5.5.00.0000.04020.01
5.4.450.0030.05019.45
5.4.440.0030.03719.40
5.4.430.0030.05719.30
5.4.420.0100.04319.33
5.4.410.0070.03319.31
5.4.400.0030.03719.07
5.4.390.0030.03718.89
5.4.380.0030.03718.98
5.4.370.0130.02719.09
5.4.360.0000.05019.13
5.4.350.0030.03718.97
5.4.340.0070.04019.07
5.4.320.0000.03318.96
5.4.310.0030.06318.98
5.4.300.0030.05718.91
5.4.290.0000.04719.12
5.4.280.0030.03718.94
5.4.270.0030.03319.11
5.4.260.0030.03018.83
5.4.250.0000.07719.19
5.4.240.0000.03319.04
5.4.230.0030.03319.03
5.4.220.0000.04718.80
5.4.210.0000.03719.22
5.4.200.0070.04319.11
5.4.190.0070.02718.86
5.4.180.0070.07719.02
5.4.170.0030.04019.02
5.4.160.0030.03719.10
5.4.150.0030.08019.00
5.4.140.0000.05716.08
5.4.130.0000.08016.38
5.4.120.0000.07316.27
5.4.110.0030.06016.26
5.4.100.0030.05316.20
5.4.90.0030.07716.43
5.4.80.0000.08016.34
5.4.70.0070.07016.29
5.4.60.0000.05016.19
5.4.50.0070.07016.18
5.4.40.0070.06716.29
5.4.30.0100.06716.30
5.4.20.0070.07016.33
5.4.10.0100.06316.23
5.4.00.0030.07015.81
5.3.290.0000.04015.73
5.3.280.0070.02715.73
5.3.270.0030.04015.73
5.3.260.0000.05715.73
5.3.250.0030.05715.73
5.3.240.0030.07715.73
5.3.230.0030.07015.73
5.3.220.0000.07315.73
5.3.210.0070.07315.73
5.3.200.0030.04315.73
5.3.190.0030.07715.73
5.3.180.0030.07715.73
5.3.170.0130.07015.73
5.3.160.0100.07015.73
5.3.150.0030.06015.73
5.3.140.0070.07715.73
5.3.130.0000.08315.73
5.3.120.0030.08015.73
5.3.110.0030.05715.73
5.3.100.0030.08015.73
5.3.90.0100.07015.73
5.3.80.0030.05015.73
5.3.70.0070.07715.73
5.3.60.0070.07015.73
5.3.50.0030.07015.73
5.3.40.0070.07315.73
5.3.30.0030.07015.73
5.3.20.0030.05015.73
5.3.10.0030.06315.73
5.3.00.0000.07015.73
5.2.170.0000.04015.73
5.2.160.0000.04715.73
5.2.150.0030.06315.73
5.2.140.0030.06315.73
5.2.130.0030.03315.73
5.2.120.0030.06015.73
5.2.110.0000.06715.73
5.2.100.0000.03315.73
5.2.90.0030.05715.73
5.2.80.0070.05015.73
5.2.70.0000.04315.73
5.2.60.0000.06715.73
5.2.50.0030.03715.73
5.2.40.0000.03015.73
5.2.30.0030.03715.73
5.2.20.0000.05715.73
5.2.10.0000.04015.73
5.2.00.0000.03715.73
5.1.60.0000.04715.73
5.1.50.0000.06015.73
5.1.40.0000.04715.73
5.1.30.0070.03715.73
5.1.20.0030.05715.73
5.1.10.0070.04315.73
5.1.00.0000.05715.73
5.0.50.0030.04015.73
5.0.40.0030.03315.73
5.0.30.0030.05315.73
5.0.20.0000.04015.73
5.0.10.0070.04015.73
5.0.00.0000.06315.73
4.4.90.0000.03715.73
4.4.80.0000.02715.73
4.4.70.0030.03715.73
4.4.60.0000.02715.73
4.4.50.0030.03715.73
4.4.40.0030.02315.73
4.4.30.0000.03715.73
4.4.20.0000.04015.73
4.4.10.0030.03715.73
4.4.00.0000.05715.73
4.3.110.0000.03715.73
4.3.100.0000.03715.73
4.3.90.0030.03015.73
4.3.80.0000.05715.73
4.3.70.0070.02715.73
4.3.60.0030.02715.73
4.3.50.0000.03715.73
4.3.40.0070.04315.73
4.3.30.0000.04015.73
4.3.20.0000.03315.73
4.3.10.0000.03015.73
4.3.00.0070.03015.73

preferences:
58.53 ms | 400 KiB | 5 Q