3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'USA' => [ 'Alabama' => [ 'Montgomery', 'Birmingham' ], 'Arizona' => [ 'Phoenix', 'Mesa', 'Gilbert' ] ], 'Germany' => [ 'West Germany' => [ 'Bonn', 'Cologne' ] ] ]; $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr)); $keys = array(); foreach ($iterator as $key => $value) { // Build long key name based on parent keys for ($i = $iterator->getDepth() - 1; $i >= 0; $i--) { $key = $iterator->getSubIterator($i)->key() . '_' . $key; } $keys[] = $key; } var_export($keys);

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.70.0120.00316.50
8.3.60.0110.00316.84
8.3.50.0130.00721.97
8.3.40.0120.00318.69
8.3.30.0140.00719.01
8.3.20.0000.00820.21
8.3.10.0080.00021.90
8.3.00.0060.00319.25
8.2.190.0070.01416.63
8.2.180.0090.01216.50
8.2.170.0080.01122.96
8.2.160.0070.00722.11
8.2.150.0180.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00318.04
8.2.110.0000.01019.39
8.2.100.0040.00717.75
8.2.90.0000.00819.34
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0040.00418.03
8.2.50.0030.00518.07
8.2.40.0000.00819.83
8.2.30.0000.00718.14
8.2.20.0040.00417.74
8.2.10.0000.00818.05
8.2.00.0070.00017.69
8.1.280.0140.00725.92
8.1.270.0080.00020.78
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.01022.05
8.1.230.0000.01217.48
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0040.00417.23
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0060.00320.42
8.1.160.0000.00722.07
8.1.150.0000.00818.77
8.1.140.0000.00917.47
8.1.130.0030.00517.85
8.1.120.0000.00717.50
8.1.110.0040.00417.52
8.1.100.0030.00517.34
8.1.90.0090.00017.50
8.1.80.0050.00217.45
8.1.70.0000.00717.45
8.1.60.0030.00617.52
8.1.50.0000.00817.55
8.1.40.0000.00717.45
8.1.30.0000.00817.65
8.1.20.0030.00617.55
8.1.10.0000.00717.55
8.1.00.0040.00417.49
8.0.300.0070.00018.77
8.0.290.0090.00016.75
8.0.280.0070.00018.49
8.0.270.0030.00317.11
8.0.260.0030.00317.27
8.0.250.0030.00316.89
8.0.240.0000.00816.99
8.0.230.0070.00016.84
8.0.220.0000.00716.77
8.0.210.0030.00516.86
8.0.200.0070.00017.01
8.0.190.0030.00317.05
8.0.180.0040.00416.76
8.0.170.0000.00817.01
8.0.160.0000.00816.96
8.0.150.0000.00716.72
8.0.140.0050.00316.85
8.0.130.0000.00513.38
8.0.120.0040.00416.86
8.0.110.0040.00416.87
8.0.100.0050.00216.77
8.0.90.0000.00716.79
8.0.80.0110.01116.91
8.0.70.0000.00816.94
8.0.60.0050.00216.91
8.0.50.0080.00016.79
8.0.30.0180.00616.87
8.0.20.0140.00917.40
8.0.10.0040.00416.90
8.0.00.0100.01016.77
7.4.330.0030.00315.03
7.4.320.0030.00316.57
7.4.300.0070.00016.60
7.4.290.0030.00316.51
7.4.280.0000.00716.62
7.4.270.0070.00016.42
7.4.260.0040.00416.52
7.4.250.0040.00416.47
7.4.240.0040.00416.59
7.4.230.0040.00316.68
7.4.220.0030.01616.43
7.4.210.0080.00916.50
7.4.200.0040.00416.62
7.4.160.0060.01316.50
7.4.150.0060.01217.40
7.4.140.0020.01517.86
7.4.130.0100.01116.62
7.4.120.0100.00716.36
7.4.110.0140.00716.66
7.4.100.0140.00616.38
7.4.90.0120.00616.42
7.4.80.0110.01216.44
7.4.70.0050.01316.46
7.4.60.0060.01016.69
7.4.50.0000.00816.55
7.4.40.0130.00316.56
7.4.30.0090.01216.56
7.4.00.0000.01114.74
7.3.330.0020.00213.11
7.3.320.0110.00313.14
7.3.310.0030.00316.08
7.3.300.0030.00316.17
7.3.290.0000.00716.13
7.3.280.0090.00716.26
7.3.270.0170.00717.40
7.3.260.0070.01016.29
7.3.250.0090.00916.43
7.3.240.0140.00716.36
7.3.230.0060.01316.39
7.3.210.0030.01516.50
7.3.200.0100.01319.39
7.3.190.0120.00416.64
7.3.180.0090.00616.51
7.3.170.0130.00616.27
7.3.160.0090.00616.57
7.2.330.0110.01116.53
7.2.320.0090.00616.51
7.2.310.0030.01416.74
7.2.300.0140.00416.45
7.2.290.0120.00416.48
7.2.60.0000.01216.89
7.2.00.0040.00919.59
7.1.200.0030.01015.90
7.1.100.0070.01018.04
7.1.70.0090.00317.01
7.1.60.0120.01219.50
7.1.50.0040.01916.92
7.1.00.0000.07722.42
7.0.200.0740.00614.71
7.0.140.0000.07722.00
7.0.60.0130.08020.06
7.0.50.0100.05017.64
7.0.40.0000.09319.90
7.0.30.0530.07720.17
7.0.20.0300.08020.13
7.0.10.0300.06720.09
7.0.00.0170.07720.13
5.6.280.0070.07021.04
5.6.210.0070.08020.47
5.6.200.0070.04718.08
5.6.190.0000.09720.79
5.6.180.0070.04320.32
5.6.170.0270.07020.51
5.6.160.0100.06020.51
5.6.150.0070.04718.12
5.6.140.0100.07718.18
5.6.130.0170.05018.18
5.6.120.0070.07020.99
5.6.110.0200.07321.14
5.6.100.0070.03721.13
5.6.90.0330.06021.12
5.6.80.0070.08020.30
5.6.70.0370.06320.49
5.5.350.0130.03720.52
5.5.340.0130.07317.95
5.5.330.0070.06320.15
5.5.320.0100.04020.57
5.5.310.0230.03320.50
5.5.300.0070.03317.91
5.5.290.0170.07717.87
5.5.280.0100.06020.88
5.5.270.0030.06720.94
5.5.260.0130.04320.73
5.5.250.0000.08720.78
5.5.240.0070.06020.26
5.4.450.0370.05719.32
5.4.440.0770.06319.43
5.4.430.0700.07719.25
5.4.420.0570.06019.32
5.4.410.0170.04718.69
5.4.400.0270.05718.70
5.4.390.0330.06018.55
5.4.380.0270.05718.63
5.4.370.0270.05718.52
5.4.360.0330.06718.64
5.4.350.0270.06718.63
5.4.340.0370.04718.70
5.4.320.0300.06018.63
5.4.310.0500.03718.50
5.4.300.0200.06718.69
5.4.290.0370.04718.71
5.4.280.0270.05718.69
5.4.270.0370.06318.67
5.4.260.0300.06018.68
5.4.250.0400.05318.73
5.4.240.0430.06718.49
5.4.230.0430.06018.48
5.4.220.0200.06018.73
5.4.210.0230.05718.68
5.4.200.0300.05316.52
5.4.190.0300.05018.48
5.4.180.0330.05718.61
5.4.170.0300.05018.51
5.4.160.0270.05018.52
5.4.150.0270.05318.48
5.4.140.0300.05716.10
5.4.130.0370.04016.07
5.4.120.0330.04716.27
5.4.110.0230.05716.16
5.4.100.0370.07716.13
5.4.90.0270.05716.25
5.4.80.0230.06016.21
5.4.70.0270.05716.15
5.4.60.0370.04716.18
5.4.50.0370.04316.20
5.4.40.0270.05016.03
5.4.30.0370.04016.02
5.4.20.0300.05016.05
5.4.10.0400.05316.20
5.4.00.0370.06715.73
5.3.290.0300.05314.63
5.3.280.0200.06014.55
5.3.270.0230.06014.61
5.3.260.0300.05314.52
5.3.250.0300.05314.61
5.3.240.0200.06014.53
5.3.230.0330.04714.51
5.3.220.0300.05014.57
5.3.210.0300.06014.64
5.3.200.0230.06314.60
5.3.190.0330.06014.55
5.3.180.0300.05714.55
5.3.170.0370.05014.62
5.3.160.0330.05014.48
5.3.150.0230.05314.68
5.3.140.0270.05014.53
5.3.130.0200.06314.62
5.3.120.0370.04714.64
5.3.110.0230.06314.54
5.3.100.0300.04714.05
5.3.90.0270.05314.12
5.3.80.0370.04314.00
5.3.70.0300.05014.01
5.3.60.0330.04313.91
5.3.50.0270.04713.92
5.3.40.0370.04713.93
5.3.30.0300.04713.88
5.3.20.0330.04713.64
5.3.10.0370.03713.66
5.3.00.0300.04713.61
5.2.170.0270.04011.18
5.2.160.0200.04711.06
5.2.150.0230.04311.09
5.2.140.0300.03711.20
5.2.130.0270.03711.16
5.2.120.0130.05011.15
5.2.110.0200.04311.07
5.2.100.0270.04311.02
5.2.90.0230.04011.14
5.2.80.0200.04711.05
5.2.70.0270.04011.15
5.2.60.0270.03711.02
5.2.50.0230.04011.05
5.2.40.0100.04711.05
5.2.30.0170.05010.91
5.2.20.0230.04710.93
5.2.10.0200.03710.87
5.2.00.0200.04010.72
5.1.60.0200.03010.11
5.1.50.0130.03710.02
5.1.40.0200.03710.04
5.1.30.0230.03310.47
5.1.20.0230.03710.48
5.1.10.0170.03710.09
5.1.00.0200.04710.04
5.0.50.0200.0208.70
5.0.40.0070.0308.47
5.0.30.0130.0438.32
5.0.20.0130.0278.38
5.0.10.0130.0278.25
5.0.00.0070.0478.27
4.4.90.0070.0235.86
4.4.80.0130.0205.82
4.4.70.0130.0275.88
4.4.60.0170.0235.86
4.4.50.0100.0305.88
4.4.40.0100.0335.85
4.4.30.0070.0235.89
4.4.20.0070.0275.93
4.4.10.0100.0235.97
4.4.00.0100.0335.91
4.3.110.0100.0205.80
4.3.100.0030.0275.74
4.3.90.0170.0135.84
4.3.80.0100.0375.80
4.3.70.0100.0275.89
4.3.60.0100.0235.80
4.3.50.0170.0205.76
4.3.40.0100.0335.78
4.3.30.0070.0274.69
4.3.20.0030.0234.69
4.3.10.0030.0234.69
4.3.00.0170.0206.88

preferences:
60.38 ms | 401 KiB | 5 Q