3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arr) { return iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator($arr) ) ); } var_dump(test(array(1,2,3,4,array(5,6,array(7),8)))); var_dump(test(array(new stdClass, new stdClass)));

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.0090.00618.18
8.3.50.0100.01017.51
8.3.40.0090.00618.56
8.3.30.0030.01318.51
8.3.20.0030.01318.70
8.3.10.0030.00620.53
8.3.00.0070.01117.50
8.2.180.0070.01116.63
8.2.170.0090.00622.96
8.2.160.0070.01122.17
8.2.150.0100.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00019.77
8.2.110.0030.00721.13
8.2.100.0060.00617.66
8.2.90.0050.00319.09
8.2.80.0030.00617.97
8.2.70.0050.00317.38
8.2.60.0000.00917.67
8.2.50.0030.00518.07
8.2.40.0030.00519.76
8.2.30.0070.00017.99
8.2.20.0040.00417.58
8.2.10.0080.00017.57
8.2.00.0050.00217.54
8.1.280.0040.01125.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.53
8.1.230.0040.00820.89
8.1.220.0050.00318.77
8.1.210.0060.00318.90
8.1.200.0060.00317.23
8.1.190.0060.00317.39
8.1.180.0000.00818.10
8.1.170.0040.00418.73
8.1.160.0000.00718.71
8.1.150.0080.00018.54
8.1.140.0000.00817.49
8.1.130.0070.00017.83
8.1.120.0030.00417.32
8.1.110.0000.00717.44
8.1.100.0050.00217.43
8.1.90.0000.00717.33
8.1.80.0040.00417.43
8.1.70.0070.00017.41
8.1.60.0040.00417.53
8.1.50.0050.00217.47
8.1.40.0040.00417.35
8.1.30.0030.00617.58
8.1.20.0030.00517.42
8.1.10.0030.00617.52
8.1.00.0040.00417.36
8.0.300.0040.00420.02
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0030.00317.27
8.0.260.0030.00316.74
8.0.250.0030.00516.96
8.0.240.0060.00316.90
8.0.230.0030.00316.90
8.0.220.0000.00716.83
8.0.210.0050.00516.86
8.0.200.0020.00516.87
8.0.190.0000.00716.86
8.0.180.0070.00016.74
8.0.170.0000.00816.83
8.0.160.0070.00016.94
8.0.150.0080.00016.69
8.0.140.0030.00616.66
8.0.130.0030.00313.31
8.0.120.0000.00716.76
8.0.110.0080.00016.73
8.0.100.0000.00716.87
8.0.90.0040.00416.82
8.0.80.0090.01016.86
8.0.70.0040.00316.70
8.0.60.0040.00416.66
8.0.50.0000.00716.75
8.0.30.0130.00717.01
8.0.20.0080.01017.07
8.0.10.0000.00716.94
8.0.00.0100.01116.64
7.4.330.0060.00213.02
7.4.320.0060.00016.50
7.4.300.0030.00316.46
7.4.290.0070.00016.64
7.4.280.0030.00616.59
7.4.270.0070.00016.61
7.4.260.0030.00313.28
7.4.250.0030.00616.60
7.4.240.0030.00316.50
7.4.230.0030.00416.56
7.4.220.0100.00616.50
7.4.210.0060.01116.61
7.4.200.0050.00216.30
7.4.190.0030.00316.78
7.4.160.0100.00616.47
7.4.150.0000.01716.32
7.4.140.0070.01017.19
7.4.130.0130.00616.54
7.4.120.0080.00916.45
7.4.110.0110.00616.42
7.4.100.0110.00616.61
7.4.90.0110.00616.36
7.4.80.0090.00916.51
7.4.70.0110.00716.37
7.4.60.0100.01316.45
7.4.50.0030.00616.33
7.4.40.0060.00616.46
7.4.30.0140.00316.55
7.4.00.0080.00814.96
7.3.330.0030.00313.11
7.3.320.0050.00013.03
7.3.310.0040.00416.23
7.3.300.0070.00016.21
7.3.290.0080.00616.32
7.3.280.0090.00916.25
7.3.270.0040.01417.07
7.3.260.0120.00816.98
7.3.250.0120.00716.29
7.3.240.0080.00816.45
7.3.230.0040.01416.34
7.3.210.0070.01016.16
7.3.200.0040.01819.39
7.3.190.0070.01116.37
7.3.180.0130.01016.36
7.3.170.0090.01216.30
7.3.160.0130.00316.40
7.3.120.0090.00914.73
7.3.110.0100.01014.71
7.3.100.0070.00714.58
7.3.90.0160.00314.75
7.3.80.0000.01214.86
7.3.70.0040.00714.87
7.3.60.0130.00014.95
7.3.50.0030.00614.57
7.3.40.0100.00314.58
7.3.30.0060.00314.71
7.3.20.0090.00616.34
7.3.10.0060.00916.78
7.3.00.0000.01516.47
7.2.330.0120.00916.49
7.2.320.0120.00616.71
7.2.310.0080.01116.70
7.2.300.0080.01216.61
7.2.290.0030.01416.63
7.2.250.0130.00715.21
7.2.240.0100.01014.95
7.2.230.0060.01314.90
7.2.220.0030.01014.84
7.2.210.0000.01314.95
7.2.200.0040.01114.70
7.2.190.0000.01114.71
7.2.180.0070.00714.76
7.2.170.0070.00714.74
7.2.00.0000.01319.09
7.1.330.0100.00315.89
7.1.320.0070.00315.53
7.1.310.0070.01015.91
7.1.300.0070.00715.63
7.1.290.0030.00715.78
7.1.280.0040.01115.76
7.1.270.0040.00915.77
7.1.260.0110.00415.82
7.1.100.0070.00717.61
7.1.70.0030.00516.91
7.1.60.0180.00719.40
7.1.50.0170.01334.76
7.1.00.0030.03342.70
7.0.200.0030.00716.70
7.0.140.0070.07021.92
7.0.120.0000.03322.02
7.0.60.0030.08019.83
7.0.50.0070.08017.89
7.0.40.0130.03720.21
7.0.30.0400.05320.24
7.0.20.0270.07320.24
7.0.10.0030.08020.09
7.0.00.0070.04320.05
5.6.280.0100.06320.86
5.6.210.0130.03020.53
5.6.200.0100.08018.15
5.6.190.0100.08720.55
5.6.180.0230.06720.48
5.6.170.0300.04720.40
5.6.160.0100.03320.54
5.6.150.0100.05018.14
5.6.140.0100.07318.18
5.6.130.0070.05318.28
5.6.120.0070.03721.10
5.6.110.0070.08021.12
5.6.100.0070.08021.00
5.6.90.0070.06321.10
5.6.80.0070.08320.51
5.5.350.0030.04720.39
5.5.340.0070.06717.96
5.5.330.0030.08020.26
5.5.320.0230.08020.31
5.5.310.0270.04720.25
5.5.300.0130.07018.09
5.5.290.0070.06718.08
5.5.280.0030.04320.88
5.5.270.0100.05020.77
5.5.260.0100.07720.87
5.5.250.0070.08020.55
5.5.240.0400.06320.23
5.4.450.0200.04719.55
5.4.440.0230.03319.64
5.4.430.0330.06319.31
5.4.420.0200.07719.55
5.4.410.0170.06719.36
5.4.400.0170.04318.95
5.4.390.0300.02718.95
5.4.380.0200.03319.09
5.4.370.0270.06719.09
5.4.360.0130.04018.95
5.4.350.0230.03019.22
5.4.340.0130.05019.23
5.4.320.0200.03318.84
5.4.310.0200.04319.06
5.4.300.0330.06719.21
5.4.290.0230.04718.99
5.4.280.0200.04719.16
5.4.270.0200.07318.99
5.4.260.0230.06319.09
5.4.250.0130.04018.85
5.4.240.0200.04718.83
5.4.230.0200.07719.21
5.4.220.0230.06018.84
5.4.210.0130.04019.16
5.4.200.0200.03319.16
5.4.190.0230.07019.25
5.4.180.0200.04318.83
5.4.170.0200.07019.23
5.4.160.0130.06719.29
5.4.150.0130.04318.97
5.4.140.0230.03016.42
5.4.130.0300.03316.38
5.4.120.0170.03716.51
5.4.110.0130.04016.25
5.4.100.0130.04016.61
5.4.90.0170.03316.28
5.4.80.0170.03316.44
5.4.70.0200.03016.52
5.4.60.0200.04016.53
5.4.50.0170.04316.35
5.4.40.0170.03716.44
5.4.30.0130.03716.25
5.4.20.0200.03716.38
5.4.10.0170.03716.42
5.4.00.0230.04015.96
5.3.290.0100.04714.72
5.3.280.0170.03714.60
5.3.270.0200.03714.60
5.3.260.0130.04014.61
5.3.250.0100.03714.59
5.3.240.0230.04014.52
5.3.230.0130.04314.58
5.3.220.0300.03314.65
5.3.210.0230.04314.79
5.3.200.0230.03314.68
5.3.190.0170.04014.58
5.3.180.0200.06014.48
5.3.170.0070.04714.48
5.3.160.0170.04314.79
5.3.150.0170.03714.54
5.3.140.0130.04014.64
5.3.130.0200.03714.57
5.3.120.0200.03314.63
5.3.110.0200.04314.56
5.3.100.0100.04313.96
5.3.90.0270.02313.95
5.3.80.0170.03314.02
5.3.70.0170.03714.26
5.3.60.0200.04314.01
5.3.50.0130.04013.86
5.3.40.0130.04013.96
5.3.30.0170.04013.92
5.3.20.0130.03713.84
5.3.10.0200.03713.80
5.3.00.0200.03013.54
5.2.170.0230.02011.37
5.2.160.0170.02711.11
5.2.150.0100.03311.06
5.2.140.0100.03311.05
5.2.130.0170.02311.23
5.2.120.0130.03011.22
5.2.110.0130.02711.15
5.2.100.0130.02711.02
5.2.90.0170.02311.06
5.2.80.0030.03311.01
5.2.70.0030.03711.26
5.2.60.0100.03311.19
5.2.50.0070.03310.91
5.2.40.0170.02311.14
5.2.30.0100.02710.97
5.2.20.0070.03010.96
5.2.10.0130.02710.81
5.2.00.0100.02710.86
5.1.60.0170.0209.88
5.1.50.0070.0279.88
5.1.40.0100.0239.98
5.1.30.0130.02310.42
5.1.20.0130.02710.28
5.1.10.0130.02310.05
5.1.00.0070.03010.22
5.0.50.0100.0178.55
5.0.40.0030.0278.49
5.0.30.0100.0278.20
5.0.20.0030.0208.10
5.0.10.0000.0238.40
5.0.00.0100.0278.24
4.4.90.0070.0136.79
4.4.80.0070.0136.79
4.4.70.0070.0176.79
4.4.60.0100.0206.79
4.4.50.0070.0136.79
4.4.40.0070.0236.79
4.4.30.0030.0206.79
4.4.20.0330.0106.79
4.4.10.0030.0176.79
4.4.00.0130.0336.79
4.3.110.0000.0176.79
4.3.100.0070.0206.79
4.3.90.0030.0176.79
4.3.80.0070.0236.79
4.3.70.0100.0306.79
4.3.60.0070.0136.79
4.3.50.0030.0176.79
4.3.40.0030.0306.79
4.3.30.0070.0106.79
4.3.20.0030.0376.79
4.3.10.0070.0136.79
4.3.00.0030.0306.79

preferences:
49.18 ms | 401 KiB | 5 Q