3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arr) { return iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator($arr) ), false ); } var_dump([1,2,3,4,[5,6,[7],8]]); var_dump([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.00616.38
8.3.50.0100.01016.38
8.3.40.0000.01418.55
8.3.30.0140.00018.51
8.3.20.0040.00418.70
8.3.10.0040.00420.40
8.3.00.0080.00019.26
8.2.180.0040.01116.50
8.2.170.0170.00322.96
8.2.160.0090.00620.93
8.2.150.0110.00425.66
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00019.23
8.2.110.0090.00020.42
8.2.100.0080.00417.84
8.2.90.0080.00019.11
8.2.80.0030.00617.97
8.2.70.0000.01117.50
8.2.60.0050.00317.80
8.2.50.0050.00418.10
8.2.40.0070.00017.97
8.2.30.0040.00418.05
8.2.20.0000.00717.45
8.2.10.0040.00417.54
8.2.00.0000.00817.42
8.1.280.0000.01525.92
8.1.270.0110.00324.66
8.1.260.0080.00026.35
8.1.250.0110.00728.09
8.1.240.0090.00021.95
8.1.230.0000.01118.97
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.36
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0000.00918.74
8.1.160.0000.00818.87
8.1.150.0000.00818.48
8.1.140.0040.00417.34
8.1.130.0030.00317.74
8.1.120.0000.00717.32
8.1.110.0000.00717.38
8.1.100.0040.00417.40
8.1.90.0030.00317.40
8.1.80.0050.00317.42
8.1.70.0040.00417.38
8.1.60.0030.00617.39
8.1.50.0050.00317.34
8.1.40.0000.00817.35
8.1.30.0020.00517.47
8.1.20.0080.00017.58
8.1.10.0040.00417.38
8.1.00.0050.00217.45
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.45
8.0.270.0040.00417.15
8.0.260.0000.00716.77
8.0.250.0050.00216.95
8.0.240.0040.00416.93
8.0.230.0000.00716.77
8.0.220.0030.00316.80
8.0.210.0040.00416.82
8.0.200.0030.00316.73
8.0.190.0110.00016.91
8.0.180.0080.00016.82
8.0.170.0050.00516.82
8.0.160.0000.00716.78
8.0.150.0000.00816.67
8.0.140.0040.00416.70
8.0.130.0030.00313.26
8.0.120.0040.00416.82
8.0.110.0000.00716.70
8.0.100.0000.00716.85
8.0.90.0070.00016.64
8.0.80.0120.00316.76
8.0.70.0050.00216.80
8.0.60.0000.00816.86
8.0.50.0040.00416.65
8.0.30.0130.00616.99
8.0.20.0110.00916.87
8.0.10.0000.00716.79
8.0.00.0140.00716.69
7.4.330.0060.00012.89
7.4.320.0000.00716.43
7.4.300.0000.00716.50
7.4.290.0080.00016.36
7.4.280.0000.00716.37
7.4.270.0000.00716.40
7.4.260.0000.00513.15
7.4.250.0030.00616.55
7.4.240.0030.00316.45
7.4.230.0030.00316.55
7.4.220.0110.00716.53
7.4.210.0090.00616.53
7.4.200.0070.00016.55
7.4.190.0000.00816.66
7.4.160.0090.01316.24
7.4.150.0090.00916.46
7.4.140.0150.00916.44
7.4.130.0070.01316.56
7.4.120.0040.01216.48
7.4.110.0170.00616.59
7.4.100.0120.01216.48
7.4.90.0140.00316.51
7.4.80.0100.01319.39
7.4.70.0050.01116.31
7.4.60.0060.01216.34
7.4.50.0060.00316.34
7.4.40.0030.01316.27
7.4.30.0160.00016.53
7.4.00.0030.01015.07
7.3.330.0060.00013.02
7.3.320.0000.00513.15
7.3.310.0000.00716.13
7.3.300.0030.00316.12
7.3.290.0080.00816.20
7.3.280.0090.00916.22
7.3.270.0110.00816.35
7.3.260.0130.00816.47
7.3.250.0130.00516.38
7.3.240.0060.01116.24
7.3.230.0100.01016.21
7.3.210.0090.00816.30
7.3.200.0080.00816.19
7.3.190.0120.00616.29
7.3.180.0030.01316.51
7.3.170.0070.01316.58
7.3.160.0070.01016.29
7.3.120.0100.00714.46
7.3.00.0030.00916.36
7.2.330.0130.00916.53
7.2.320.0100.01016.30
7.2.310.0040.01516.54
7.2.300.0090.00916.35
7.2.290.0090.00916.32
7.2.130.0070.00716.74
7.2.120.0060.00916.47
7.2.110.0060.00616.51
7.2.100.0090.00016.57
7.2.90.0120.00316.62
7.2.80.0060.00616.56
7.2.70.0060.00616.20
7.2.60.0100.00316.45
7.2.50.0070.00716.82
7.2.40.0040.01216.63
7.2.30.0100.00616.71
7.2.20.0060.01016.79
7.2.10.0060.01016.57
7.2.00.0100.00618.02
7.1.250.0060.00615.65
7.1.240.0040.00715.61
7.1.230.0120.00015.54
7.1.220.0070.01015.54
7.1.210.0100.00315.56
7.1.200.0050.00515.57
7.1.190.0100.00315.48
7.1.180.0060.00615.20
7.1.170.0070.00415.57
7.1.160.0120.00615.60
7.1.150.0070.01015.29
7.1.140.0130.00315.64
7.1.130.0130.00315.41
7.1.120.0060.00615.60
7.1.110.0060.00615.30
7.1.100.0110.00415.52
7.1.90.0120.00315.43
7.1.80.0100.00715.48
7.1.70.0060.00616.05
7.1.60.0120.00517.37
7.1.50.0050.00716.20
7.1.40.0100.00715.66
7.1.30.0100.00315.58
7.1.20.0110.00815.47
7.1.10.0060.00615.54
7.1.00.0050.04319.00
7.0.330.0120.00015.03
7.0.320.0030.00915.20
7.0.310.0120.00015.20
7.0.300.0130.01015.16
7.0.290.0130.01114.98
7.0.280.0070.01114.94
7.0.270.0070.01114.82
7.0.260.0130.00315.02
7.0.250.0120.00315.31
7.0.240.0070.01015.06
7.0.230.0070.01014.85
7.0.220.0030.01214.65
7.0.210.0120.00414.98
7.0.200.0140.00514.90
7.0.190.0100.00714.80
7.0.180.0120.00414.97
7.0.170.0070.00714.95
7.0.160.0070.00714.93
7.0.150.0040.00815.18
7.0.140.0030.03818.42
7.0.130.0080.00814.85
7.0.120.0070.03518.65
7.0.110.0040.00715.24
7.0.100.0140.00014.96
7.0.90.0100.00715.05
7.0.80.0100.00315.04
7.0.70.0100.00714.73
7.0.60.0130.03217.47
7.0.50.0090.04116.42
7.0.40.0120.04216.69
7.0.30.0120.03416.65
7.0.20.0130.04116.75
7.0.10.0170.03816.73
7.0.00.0140.03716.55
5.6.380.0110.00414.06
5.6.370.0030.01014.42
5.6.360.0070.01013.93
5.6.350.0060.01014.29
5.6.340.0030.01014.21
5.6.330.0070.00714.13
5.6.320.0060.00614.33
5.6.310.0080.00814.11
5.6.300.0040.00714.40
5.6.290.0030.00614.18
5.6.280.0080.03617.48
5.6.270.0060.00314.23
5.6.260.0000.01113.93
5.6.250.0060.00913.91
5.6.240.0110.00414.17
5.6.230.0080.00414.28
5.6.220.0090.00414.20
5.6.210.0100.04217.40
5.6.200.0020.02816.02
5.6.190.0150.04517.22
5.6.180.0180.03017.32
5.6.170.0170.03917.26
5.6.160.0170.03217.45
5.6.150.0200.03017.23
5.6.140.0180.02617.18
5.6.130.0150.04317.24
5.6.120.0190.04117.04
5.6.110.0180.04217.27
5.6.100.0180.03717.13
5.6.90.0140.04717.31
5.6.80.0150.02316.64
5.6.70.0120.04116.87
5.6.60.0160.04017.00
5.6.50.0130.03416.70
5.6.40.0170.03416.92
5.6.30.0180.03216.83
5.6.20.0140.02816.80
5.6.10.0100.03416.90
5.6.00.0090.03616.54
5.5.380.0060.00310.68
5.5.370.0000.00810.69
5.5.360.0080.00411.11
5.5.350.0160.02215.65
5.5.340.0050.02914.40
5.5.330.0090.03415.67
5.5.320.0150.02415.47
5.5.310.0100.03015.61
5.5.300.0130.03515.66
5.5.290.0140.02715.52
5.5.280.0200.03215.64
5.5.270.0160.02915.45
5.5.260.0150.04015.38
5.5.250.0130.02615.08
5.5.240.0180.03715.14
5.5.230.0170.02215.24
5.5.220.0130.04314.97
5.5.210.0170.03615.15
5.5.200.0120.04715.00
5.5.190.0100.02515.06
5.5.180.0080.02715.07
5.5.170.0000.00910.86
5.5.160.0150.03914.95
5.5.150.0210.03315.06
5.5.140.0180.03915.23
5.5.130.0170.03115.26
5.5.120.0170.04215.27
5.5.110.0190.03915.26
5.5.100.0130.03615.11
5.5.90.0110.03015.18
5.5.80.0130.03315.24
5.5.70.0080.03315.22
5.5.60.0140.03715.29
5.5.50.0180.04014.91
5.5.40.0080.03015.33
5.5.30.0130.03615.14
5.5.20.0160.02715.30
5.5.10.0150.03215.15
5.5.00.0160.01815.25
5.4.450.0220.02715.03
5.4.440.0190.03615.18
5.4.430.0170.03815.08
5.4.420.0190.03515.15
5.4.410.0170.04114.85
5.4.400.0190.03214.90
5.4.390.0140.03714.79
5.4.380.0130.04115.19
5.4.370.0130.03115.00
5.4.360.0100.04515.07
5.4.350.0160.04014.78
5.4.340.0170.03214.94
5.4.330.0030.00311.09
5.4.320.0070.03114.83
5.4.310.0060.02914.80
5.4.300.0110.02814.95
5.4.290.0170.01814.86
5.4.280.0150.04715.00
5.4.270.0150.02315.14
5.4.260.0160.03715.09
5.4.250.0130.04315.08
5.4.240.0180.03114.92
5.4.230.0170.03814.99
5.4.220.0150.03014.90
5.4.210.0190.02914.92
5.4.200.0130.03614.81
5.4.190.0100.03714.99
5.4.180.0130.02014.93
5.4.170.0140.02415.02
5.4.160.0180.02014.93
5.4.150.0120.02715.09
5.4.140.0100.02513.61
5.4.130.0120.02013.62
5.4.120.0170.02913.63
5.4.110.0120.04513.56
5.4.100.0170.03313.63
5.4.90.0170.03713.77
5.4.80.0130.02813.55
5.4.70.0280.03913.45
5.4.60.0260.02313.63
5.4.50.0180.03213.52
5.4.40.0260.01813.59
5.4.30.0170.02013.53
5.4.20.0130.02813.41
5.4.10.0210.03013.65
5.4.00.0210.03613.29
5.3.290.0220.03212.48
5.3.280.0190.03712.43
5.3.270.0140.02412.47
5.3.260.0150.02812.44
5.3.250.0100.02312.43
5.3.240.0140.02012.44
5.3.230.0190.02512.45
5.3.220.0210.03512.42
5.3.210.0200.03312.35
5.3.200.0190.03712.50
5.3.190.0160.02912.42
5.3.180.0120.02312.54
5.3.170.0180.02512.58
5.3.160.0280.03612.47
5.3.150.0310.02512.50
5.3.140.0290.02212.44
5.3.130.0260.03612.41
5.3.120.0330.02712.40
5.3.110.0270.02312.43
5.3.100.0400.03012.23
5.3.90.0260.03412.17
5.3.80.0130.03112.18
5.3.70.0340.02712.10
5.3.60.0320.02512.13
5.3.50.0240.02512.10
5.3.40.0290.02712.13
5.3.30.0330.02312.16
5.3.20.0180.03312.04
5.3.10.0210.04011.98
5.3.00.0210.03512.02
5.2.170.0250.03311.35
5.2.160.0220.02811.35
5.2.150.0240.03411.35
5.2.140.0160.03511.35
5.2.130.0150.03011.35
5.2.120.0150.02911.35
5.2.110.0100.02211.35
5.2.100.0170.02811.35
5.2.90.0180.03111.35
5.2.80.0190.02011.35
5.2.70.0230.02311.35
5.2.60.0260.02511.35
5.2.50.0140.02811.35
5.2.40.0130.02311.35
5.2.30.0240.03111.35
5.2.20.0110.02811.35
5.2.10.0200.03311.35
5.2.00.0240.02511.35
5.1.60.0100.02011.35
5.1.50.0230.02511.35
5.1.40.0230.02511.35
5.1.30.0170.01711.35
5.1.20.0230.02511.35
5.1.10.0240.02211.35
5.1.00.0170.02811.35
5.0.50.0090.02011.35
5.0.40.0090.02311.35
5.0.30.0120.02011.35
5.0.20.0050.02411.35
5.0.10.0080.02111.35
5.0.00.0040.03311.35
4.4.90.0030.02311.35
4.4.80.0040.01811.35
4.4.70.0100.02011.35
4.4.60.0140.01511.35
4.4.50.0180.01911.35
4.4.40.0120.02711.35
4.4.30.0070.01411.35
4.4.20.0120.01311.35
4.4.10.0050.01811.35
4.4.00.0070.02511.35
4.3.110.0030.02011.35
4.3.100.0080.00711.35
4.3.90.0100.01311.35
4.3.80.0080.02511.35
4.3.70.0050.01711.35
4.3.60.0060.01011.35
4.3.50.0030.01311.35
4.3.40.0040.01511.35
4.3.30.0010.01111.35
4.3.20.0030.00811.35
4.3.10.0030.00711.35
4.3.00.0010.01011.35

preferences:
46.52 ms | 401 KiB | 5 Q