3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arr) { return iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator($arr, RecursiveArrayIterator::CHILD_ARRAYS_ONLY) ), false ); } var_dump(test([1,2,3,4,[5,6,[7],8]])); var_dump(test([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.0130.00918.53
8.3.50.0090.00821.20
8.3.40.0040.01118.58
8.3.30.0040.01118.74
8.3.20.0030.00618.68
8.3.10.0030.00620.33
8.3.00.0000.00819.38
8.2.180.0090.00916.50
8.2.170.0030.01322.96
8.2.160.0130.00322.24
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0020.00526.16
8.2.120.0040.00419.83
8.2.110.0060.01222.30
8.2.100.0000.01117.84
8.2.90.0030.00519.08
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0030.00517.92
8.2.50.0080.00018.07
8.2.40.0040.00418.03
8.2.30.0040.00418.00
8.2.20.0050.00217.59
8.2.10.0000.00717.59
8.2.00.0040.00417.56
8.1.280.0170.00325.92
8.1.270.0040.00423.99
8.1.260.0040.01126.35
8.1.250.0070.00028.09
8.1.240.0030.00723.77
8.1.230.0070.00420.77
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0000.00917.22
8.1.190.0040.00417.50
8.1.180.0040.00418.10
8.1.170.0040.00418.95
8.1.160.0050.00318.83
8.1.150.0060.00318.57
8.1.140.0040.00417.41
8.1.130.0030.00317.82
8.1.120.0000.00717.31
8.1.110.0030.00517.40
8.1.100.0000.00817.43
8.1.90.0070.00017.36
8.1.80.0080.00017.43
8.1.70.0070.00017.41
8.1.60.0040.00417.54
8.1.50.0060.00617.46
8.1.40.0000.01017.46
8.1.30.0070.00017.64
8.1.20.0000.00817.57
8.1.10.0000.00717.52
8.1.00.0000.00817.31
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00318.47
8.0.270.0030.00317.18
8.0.260.0070.00016.89
8.0.250.0000.00916.98
8.0.240.0000.00817.00
8.0.230.0040.00416.95
8.0.220.0040.00416.87
8.0.210.0000.00716.78
8.0.200.0000.00616.95
8.0.190.0000.00716.93
8.0.180.0070.00016.93
8.0.170.0030.00716.87
8.0.160.0070.00016.89
8.0.150.0000.00816.81
8.0.140.0060.00616.85
8.0.130.0000.00513.27
8.0.120.0070.00016.73
8.0.110.0050.00216.95
8.0.100.0000.00816.89
8.0.90.0080.00016.82
8.0.80.0060.00916.88
8.0.70.0000.00716.70
8.0.60.0070.00016.76
8.0.50.0040.00416.96
8.0.30.0020.01917.07
8.0.20.0130.00617.40
8.0.10.0040.00416.95
8.0.00.0090.01116.86
7.4.330.0050.00013.43
7.4.320.0030.00316.46
7.4.300.0030.00316.45
7.4.290.0000.00716.52
7.4.280.0000.00816.63
7.4.270.0000.00816.53
7.4.260.0030.00313.32
7.4.250.0000.00716.40
7.4.240.0000.00716.64
7.4.230.0000.00716.59
7.4.220.0190.00316.61
7.4.210.0110.00716.52
7.4.200.0000.00716.51
7.4.190.0030.00316.61
7.4.160.0060.00916.68
7.4.150.0200.00017.40
7.4.140.0110.00617.19
7.4.130.0090.00816.54
7.4.120.0100.00916.66
7.4.110.0090.00616.68
7.4.100.0130.00416.45
7.4.90.0170.01016.31
7.4.80.0100.00719.03
7.4.70.0130.00616.52
7.4.60.0060.01116.52
7.4.50.0050.00016.62
7.4.40.0130.00322.27
7.4.30.0030.01616.48
7.4.00.0060.00914.98
7.3.330.0020.00313.11
7.3.320.0030.00313.04
7.3.310.0070.00016.09
7.3.300.0000.00716.20
7.3.290.0100.00316.26
7.3.280.0090.00816.19
7.3.270.0120.00617.40
7.3.260.0060.02018.24
7.3.250.0120.00816.41
7.3.240.0100.01316.34
7.3.230.0030.01416.45
7.3.210.0130.00816.47
7.3.200.0120.01119.39
7.3.190.0040.01516.40
7.3.180.0060.00916.43
7.3.170.0180.00616.27
7.3.160.0060.00916.32
7.3.120.0100.00714.66
7.3.110.0030.00714.85
7.3.100.0070.01014.84
7.3.90.0040.01114.87
7.3.80.0060.00914.98
7.3.70.0040.01114.79
7.3.60.0110.00414.81
7.3.50.0040.01114.79
7.3.40.0060.00914.81
7.3.30.0060.00614.74
7.3.20.0030.01016.63
7.3.10.0080.00616.18
7.3.00.0060.00816.46
7.2.330.0180.00716.59
7.2.320.0130.00316.31
7.2.310.0130.01016.68
7.2.300.0060.01116.56
7.2.290.0050.01016.56
7.2.240.0000.01814.66
7.2.230.0070.00714.55
7.2.220.0070.01115.02
7.2.210.0060.00614.77
7.2.200.0070.01014.77
7.2.190.0030.01314.85
7.2.180.0100.00715.00
7.2.170.0040.00815.05
7.2.160.0000.01414.93
7.2.150.0060.00616.82
7.2.140.0090.00616.69
7.2.130.0120.00616.69
7.2.120.0070.01016.70
7.2.110.0090.00716.67
7.2.100.0120.00216.49
7.2.90.0100.00816.77
7.2.80.0050.01216.64
7.2.70.0060.01116.46
7.2.60.0080.00816.68
7.2.50.0100.00616.63
7.2.40.0090.01016.63
7.2.30.0100.00716.68
7.2.20.0100.00616.75
7.2.10.0120.00616.72
7.2.00.0040.01017.23
7.1.330.0080.00815.61
7.1.320.0060.00615.79
7.1.310.0040.01115.64
7.1.300.0150.00015.80
7.1.290.0060.00315.43
7.1.280.0040.01115.75
7.1.270.0040.00715.72
7.1.260.0060.00315.82
7.1.250.0080.00815.60
7.1.240.0080.00415.89
7.1.230.0070.00715.82
7.1.220.0000.01415.86
7.1.210.0000.01615.55
7.1.200.0110.00315.68
7.1.190.0070.00715.52
7.1.180.0090.00315.57
7.1.170.0090.00015.77
7.1.160.0060.00915.82
7.1.150.0030.01015.83
7.1.140.0040.00815.72
7.1.130.0030.00615.85
7.1.120.0120.00315.84
7.1.110.0100.00715.80
7.1.100.0030.01016.90
7.1.90.0060.00915.81
7.1.80.0040.00715.77
7.1.70.0020.00916.53
7.1.60.0050.01317.52
7.1.50.0100.00716.30
7.1.40.0080.00415.89
7.1.30.0100.00015.83
7.1.20.0060.00915.57
7.1.10.0090.00615.78
7.1.00.0080.03819.11
7.0.330.0110.00415.43
7.0.320.0040.01115.13
7.0.310.0040.01115.35
7.0.300.0070.00315.14
7.0.290.0100.00315.31
7.0.280.0110.00315.37
7.0.270.0030.01215.40
7.0.260.0030.01215.29
7.0.250.0040.01215.37
7.0.240.0080.00815.16
7.0.230.0000.01015.46
7.0.220.0110.00315.62
7.0.210.0000.01315.14
7.0.200.0000.01216.11
7.0.190.0060.00315.11
7.0.180.0040.00815.53
7.0.170.0090.00615.48
7.0.160.0040.00415.61
7.0.150.0000.01215.49
7.0.140.0080.03718.66
7.0.130.0070.00715.30
7.0.120.0100.00315.34
7.0.110.0060.00615.48
7.0.100.0070.00415.53
7.0.90.0030.00915.46
7.0.80.0120.00315.37
7.0.70.0070.00715.29
7.0.60.0030.02018.59
7.0.50.0020.02218.73
7.0.40.0070.02516.80
7.0.30.0030.04416.63
7.0.20.0100.04216.77
7.0.10.0030.04816.76
7.0.00.0080.04016.83
5.6.380.0040.01114.20
5.6.370.0070.00414.13
5.6.360.0000.01214.19
5.6.350.0060.00914.31
5.6.340.0070.00414.41
5.6.330.0100.00313.77
5.6.320.0060.00314.17
5.6.310.0060.00614.06
5.6.300.0130.00513.80
5.6.290.0080.00814.21
5.6.280.0030.04217.60
5.6.270.0050.00514.08
5.6.260.0040.01114.12
5.6.250.0060.00614.11
5.6.240.0030.01014.39
5.6.230.0090.00613.93
5.6.220.0040.01114.07
5.6.210.0000.02417.33
5.6.200.0020.02317.58
5.6.190.0070.02217.62
5.6.180.0030.04117.58
5.6.170.0110.03617.62
5.6.160.0060.03717.59
5.6.150.0110.03317.58
5.6.140.0070.03517.55
5.6.130.0070.03517.77
5.6.120.0020.05117.47
5.6.110.0050.04517.79
5.6.100.0030.04817.46
5.6.90.0030.04317.74
5.6.80.0030.04317.41
5.6.70.0090.04117.21
5.6.60.0050.04217.28
5.6.50.0020.04317.21
5.6.40.0030.04217.14
5.6.30.0030.04017.28
5.6.20.0110.03117.17
5.6.10.0050.04017.19
5.6.00.0070.04217.23
5.5.380.0070.00411.18
5.5.370.0060.00611.25
5.5.360.0060.00011.18
5.5.350.0040.01915.74
5.5.340.0070.02016.03
5.5.330.0010.02116.04
5.5.320.0040.04416.07
5.5.310.0020.03815.97
5.5.300.0020.03116.02
5.5.290.0030.05216.06
5.5.280.0090.04116.02
5.5.270.0030.04215.97
5.5.260.0060.04516.04
5.5.250.0050.03615.94
5.5.240.0030.03215.67
5.5.230.0050.03715.76
5.5.220.0020.02715.72
5.5.210.0050.04215.70
5.5.200.0100.03315.70
5.5.190.0080.03815.68
5.5.180.0030.03415.65
5.5.170.0000.01211.22
5.5.160.0030.03015.58
5.5.150.0050.04315.68
5.5.140.0020.04615.65
5.5.130.0080.04015.70
5.5.120.0030.04215.71
5.5.110.0100.03215.70
5.5.100.0050.04315.62
5.5.90.0060.02815.61
5.5.80.0070.03115.63
5.5.70.0030.03815.63
5.5.60.0060.04015.63
5.5.50.0030.04015.59
5.5.40.0080.03715.60
5.5.30.0020.04515.64
5.5.20.0070.03315.65
5.5.10.0080.03515.59
5.5.00.0110.03015.66
5.4.450.0090.03015.21
5.4.440.0060.04315.26
5.4.430.0000.04615.25
5.4.420.0080.03815.21
5.4.410.0050.02715.31
5.4.400.0050.02615.09
5.4.390.0020.04515.11
5.4.380.0080.03815.04
5.4.370.0020.04015.10
5.4.360.0030.03815.04
5.4.350.0030.04315.17
5.4.340.0050.03515.10
5.4.330.0040.00811.18
5.4.320.0050.02315.09
5.4.310.0040.04015.04
5.4.300.0070.04215.15
5.4.290.0050.03015.19
5.4.280.0060.04115.09
5.4.270.0030.03515.15
5.4.260.0050.03815.09
5.4.250.0060.03815.09
5.4.240.0100.03515.17
5.4.230.0030.03515.05
5.4.220.0070.04115.13
5.4.210.0020.03815.12
5.4.200.0070.03715.05
5.4.190.0080.03615.05
5.4.180.0030.02815.21
5.4.170.0030.04115.16
5.4.160.0050.02615.08
5.4.150.0050.03615.12
5.4.140.0040.04013.80
5.4.130.0080.02813.80
5.4.120.0020.03113.66
5.4.110.0040.02113.80
5.4.100.0030.02113.71
5.4.90.0030.02313.84
5.4.80.0060.03513.76
5.4.70.0050.02613.81
5.4.60.0040.01813.79
5.4.50.0020.03413.83
5.4.40.0050.03513.82
5.4.30.0110.03613.76
5.4.20.0030.02913.79
5.4.10.0020.02513.79
5.4.00.0080.02013.46
5.3.290.0050.03312.97
5.3.280.0060.03012.91
5.3.270.0030.04112.88
5.3.260.0030.02912.88
5.3.250.0040.03712.91
5.3.240.0030.03512.91
5.3.230.0100.03712.92
5.3.220.0040.03912.89
5.3.210.0030.03912.90
5.3.200.0030.02112.87
5.3.190.0040.03012.90
5.3.180.0040.03312.88
5.3.170.0080.03712.80
5.3.160.0010.03612.89
5.3.150.0030.03712.92
5.3.140.0030.03812.87
5.3.130.0020.03612.88
5.3.120.0000.03212.89
5.3.110.0060.02912.89
5.3.100.0030.02912.61
5.3.90.0000.02712.63
5.3.80.0050.02512.63
5.3.70.0010.03912.59
5.3.60.0020.02912.64
5.3.50.0050.02312.59
5.3.40.0030.03712.55
5.3.30.0060.03612.58
5.3.20.0070.01812.43
5.3.10.0000.03512.46
5.3.00.0050.03612.43
5.2.170.0070.01511.21
5.2.160.0050.01811.19
5.2.150.0030.02811.11
5.2.140.0030.03011.18
5.2.130.0050.02511.06
5.2.120.0020.03511.18
5.2.110.0020.01911.09
5.2.100.0020.03111.07
5.2.90.0050.02211.16
5.2.80.0000.02111.18
5.2.70.0030.02811.17
5.2.60.0070.02511.05
5.2.50.0030.03011.08
5.2.40.0050.02011.10
5.2.30.0070.01511.10
5.2.20.0030.02411.08
5.2.10.0060.02011.01
5.2.00.0050.02010.92
5.1.60.0050.02310.51
5.1.50.0020.01610.52
5.1.40.0060.02010.56
5.1.30.0010.02410.81
5.1.20.0030.02310.77
5.1.10.0040.01510.62
5.1.00.0030.01910.66
5.0.50.0000.03310.16
5.0.40.0000.02410.16
5.0.30.0020.02010.16
5.0.20.0040.02010.16
5.0.10.0080.01410.16
5.0.00.0010.02210.16
4.4.90.0030.01010.16
4.4.80.0050.01710.16
4.4.70.0030.01510.16
4.4.60.0020.01310.16
4.4.50.0030.01510.16
4.4.40.0020.01510.16
4.4.30.0050.01510.16
4.4.20.0030.01210.16
4.4.10.0000.01310.16
4.4.00.0030.02610.16
4.3.110.0020.01810.16
4.3.100.0030.01310.16
4.3.90.0020.01910.16
4.3.80.0010.01810.16
4.3.70.0030.00710.16
4.3.60.0050.01710.16
4.3.50.0030.01310.16
4.3.40.0010.03010.16
4.3.30.0030.01210.16
4.3.20.0030.01810.16
4.3.10.0020.01610.16
4.3.00.0020.01510.16

preferences:
58.67 ms | 401 KiB | 5 Q