3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 1 => [ 1 => [ 'anna', 'alice' ], 2 => [ 'bob', 'bartold' ] ], 2 => [ 1 => [ 'carol' ], 2 => [ 'david' ] ] ]; $result = []; $iterator = new \RecursiveIteratorIterator( new \RecursiveArrayIterator($array) ); foreach ($iterator as $row) { $result[] = $row; } var_dump($result);

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.40.0100.01018.81
8.3.30.0000.01419.04
8.3.20.0080.00020.30
8.3.10.0080.00021.95
8.3.00.0000.00820.94
8.2.170.0070.00722.96
8.2.160.0070.00722.06
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0080.00019.66
8.2.110.0090.00020.55
8.2.100.0110.00018.03
8.2.90.0000.00819.36
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00619.88
8.2.30.0040.00418.13
8.2.20.0040.00417.73
8.2.10.0000.00718.00
8.2.00.0050.00217.63
8.1.270.0030.00720.64
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00423.97
8.1.230.0070.00419.00
8.1.220.0030.00617.79
8.1.210.0000.00718.77
8.1.200.0070.00317.23
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0000.00818.65
8.1.160.0050.00222.01
8.1.150.0000.00818.81
8.1.140.0040.00417.50
8.1.130.0040.00417.81
8.1.120.0000.00717.48
8.1.110.0030.00517.35
8.1.100.0040.00417.47
8.1.90.0060.00417.44
8.1.80.0000.00717.48
8.1.70.0000.00717.50
8.1.60.0000.00817.48
8.1.50.0050.00317.58
8.1.40.0090.00017.46
8.1.30.0030.00617.53
8.1.20.0050.00217.51
8.1.10.0040.00417.40
8.1.00.0000.00817.56
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0050.00218.41
8.0.270.0070.00017.20
8.0.260.0000.00717.31
8.0.250.0030.00316.98
8.0.240.0000.00716.98
8.0.230.0000.00716.98
8.0.220.0030.00316.89
8.0.210.0040.00416.82
8.0.200.0040.00416.82
8.0.190.0070.00016.86
8.0.180.0000.00816.90
8.0.170.0040.00416.94
8.0.160.0050.00216.94
8.0.150.0030.00616.80
8.0.140.0020.00516.80
8.0.130.0000.00513.24
8.0.120.0040.00416.87
8.0.110.0040.00416.89
8.0.100.0040.00416.85
8.0.90.0040.00416.91
8.0.80.0130.00716.86
8.0.70.0000.00716.74
8.0.60.0030.00517.01
8.0.50.0000.00716.93
8.0.30.0180.00317.11
8.0.20.0070.01617.40
8.0.10.0030.00516.92
8.0.00.0100.00816.64
7.4.330.0030.00315.05
7.4.320.0040.00416.50
7.4.300.0000.00616.49
7.4.290.0040.00416.60
7.4.280.0110.00016.56
7.4.270.0030.00316.41
7.4.260.0050.00316.57
7.4.250.0050.00316.52
7.4.240.0050.00216.42
7.4.230.0030.00316.41
7.4.220.0180.00916.63
7.4.210.0060.00816.51
7.4.200.0000.00716.43
7.4.160.0110.01116.66
7.4.150.0100.00817.40
7.4.140.0180.00317.86
7.4.130.0140.00616.51
7.4.120.0080.01116.49
7.4.110.0080.00816.48
7.4.100.0090.00916.53
7.4.90.0140.00316.46
7.4.80.0080.00816.55
7.4.70.0130.00516.50
7.4.60.0080.00816.53
7.4.50.0080.00016.68
7.4.40.0060.01016.47
7.4.30.0090.01316.47
7.4.00.0040.01215.14
7.3.330.0000.00513.08
7.3.320.0130.00013.12
7.3.310.0040.00416.28
7.3.300.0000.00716.26
7.3.290.0000.00616.30
7.3.280.0130.00616.28
7.3.270.0130.01017.40
7.3.260.0030.01516.52
7.3.250.0140.00516.40
7.3.240.0050.01116.36
7.3.230.0030.01416.51
7.3.210.0100.00716.51
7.3.200.0150.00619.39
7.3.190.0030.01716.21
7.3.180.0040.01316.51
7.3.170.0060.01116.49
7.3.160.0060.01216.37
7.3.10.0080.00516.47
7.3.00.0070.00616.50
7.2.330.0090.00916.77
7.2.320.0030.01316.80
7.2.310.0150.01216.71
7.2.300.0000.01616.54
7.2.290.0090.01216.62
7.2.130.0130.00616.56
7.2.120.0040.01516.77
7.2.110.0110.00716.74
7.2.100.0070.01016.53
7.2.90.0160.00516.50
7.2.80.0100.00716.59
7.2.70.0090.00816.45
7.2.60.0110.00416.71
7.2.50.0080.00716.62
7.2.40.0060.00916.82
7.2.30.0060.00616.46
7.2.20.0080.01016.74
7.2.10.0100.00816.86
7.2.00.0100.00617.69
7.1.250.0080.00815.67
7.1.200.0060.00615.52
7.1.100.0000.00918.21
7.1.70.0030.01017.12
7.1.60.0100.01419.46
7.1.50.0100.01016.86
7.1.00.0000.07722.54
7.0.200.0040.00416.64
7.0.140.0000.05022.00
7.0.60.0170.07719.91
7.0.50.0100.08017.84
7.0.40.0100.04720.23
7.0.30.0230.04720.21
7.0.20.0330.07020.00
7.0.10.0070.09020.30
7.0.00.0100.07020.31
5.6.280.0070.07021.10
5.6.210.0130.07320.48
5.6.200.0030.05318.09
5.6.190.0130.05020.56
5.6.180.0030.04720.35
5.6.170.0230.03720.48
5.6.160.0070.04320.61
5.6.150.0070.08018.20
5.6.140.0070.08318.22
5.6.130.0030.04018.20
5.6.120.0000.04720.98
5.6.110.0170.08021.11
5.6.100.0030.08020.97
5.6.90.0030.05020.93
5.6.80.0100.08020.41
5.6.70.0170.07720.47
5.5.350.0100.05320.43
5.5.340.0100.03717.88
5.5.330.0100.07020.57
5.5.320.2900.03720.18
5.5.310.0270.08020.29
5.5.300.0030.04017.95
5.5.290.0000.04317.98
5.5.280.0100.08020.79
5.5.270.0030.09320.67
5.5.260.0000.04720.86
5.5.250.0030.08720.70
5.5.240.0170.03320.35
5.4.450.0730.04719.54
5.4.440.0870.06319.10
5.4.430.0600.05719.54
5.4.420.1000.04719.46
5.4.410.0830.05319.00
5.4.400.1170.04719.13
5.4.390.0300.05718.66
5.4.380.0100.06718.46
5.4.370.0100.05718.59
5.4.360.0130.05318.59
5.4.350.0200.04718.50
5.4.340.0170.05018.49
5.4.320.0070.06318.52
5.4.310.0230.04718.50
5.4.300.0230.04318.62
5.4.290.0130.05318.72
5.4.280.0130.05318.69
5.4.270.0130.05018.68
5.4.260.0030.06018.55
5.4.250.0100.06018.49
5.4.240.0130.05318.46
5.4.230.0070.06318.70
5.4.220.0200.06318.67
5.4.210.0130.05318.51
5.4.200.0230.04016.64
5.4.190.0170.05318.63
5.4.180.0130.05018.57
5.4.170.0130.05318.67
5.4.160.0130.05318.66
5.4.150.0100.07018.63
5.4.140.0070.06016.27
5.4.130.0130.04716.13
5.4.120.0300.03316.25
5.4.110.0100.05316.05
5.4.100.0170.05016.05
5.4.90.0100.06016.30
5.4.80.0130.05016.07
5.4.70.0200.05016.05
5.4.60.0130.07716.17
5.4.50.0130.05316.33
5.4.40.0100.05316.24
5.4.30.0070.05316.18
5.4.20.0170.04716.07
5.4.10.0100.05316.05
5.4.00.0170.04715.63
5.3.290.0130.06714.76
5.3.280.0170.05314.52
5.3.270.0070.06314.70
5.3.260.0130.07714.57
5.3.250.0200.04714.68
5.3.240.0170.07014.59
5.3.230.0170.06014.65
5.3.220.0100.05714.66
5.3.210.0170.05014.59
5.3.200.0100.05314.67
5.3.190.0130.05014.61
5.3.180.0130.05014.61
5.3.170.0300.06014.53
5.3.160.0270.06014.64
5.3.150.0200.06714.55
5.3.140.0170.07014.45
5.3.130.0200.06014.44
5.3.120.0230.05014.64
5.3.110.0230.04714.45
5.3.100.0100.06013.95
5.3.90.0130.07014.00
5.3.80.0200.06313.94
5.3.70.0170.06013.93
5.3.60.0100.06013.95
5.3.50.0230.04313.86
5.3.40.0170.05013.91
5.3.30.0270.03713.86
5.3.20.0100.05313.68
5.3.10.0100.05713.57
5.3.00.0130.07013.62
5.2.170.0070.04711.18
5.2.160.0100.03711.13
5.2.150.0200.03311.19
5.2.140.0100.05011.20
5.2.130.0070.04711.04
5.2.120.0130.04311.07
5.2.110.0100.05311.03
5.2.100.0130.05311.05
5.2.90.0030.05311.13
5.2.80.0070.04711.08
5.2.70.0100.04011.07
5.2.60.0070.04711.02
5.2.50.0170.04011.04
5.2.40.0000.04711.05
5.2.30.0100.04011.00
5.2.20.0170.03310.98
5.2.10.0130.05010.89
5.2.00.0200.04310.81
5.1.60.0100.0379.96
5.1.50.0130.03310.11
5.1.40.0130.0309.95
5.1.30.0130.03310.29
5.1.20.0070.04310.37
5.1.10.0130.04310.13
5.1.00.0170.04310.13
5.0.50.0070.0408.66
5.0.40.0070.0278.48
5.0.30.0100.0538.24
5.0.20.0030.0308.38
5.0.10.0100.0238.28
5.0.00.0030.0478.25
4.4.90.0100.0175.88
4.4.80.0030.0235.89
4.4.70.0030.0235.81
4.4.60.0000.0275.91
4.4.50.0100.0275.86
4.4.40.0100.0405.81
4.4.30.0100.0235.87
4.4.20.0030.0335.88
4.4.10.0130.0235.98
4.4.00.0000.0475.91
4.3.110.0070.0235.84
4.3.100.0070.0275.74
4.3.90.0030.0305.82
4.3.80.0030.0435.87
4.3.70.0030.0335.87
4.3.60.0070.0205.84
4.3.50.0030.0235.82
4.3.40.0030.0375.78
4.3.30.0100.0174.90
4.3.20.0070.0274.90
4.3.10.0070.0204.90
4.3.00.0070.0237.09

preferences:
42.41 ms | 400 KiB | 5 Q