3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'Country' => array( 'United Kingdom' => array( 'London' => array( 0 => 1, 1 => 5, 2 => 23, 3 => 71 ), 'Manchester' => array( 0 => 800 ) ), 'United States' => array( 'New York' => array( 0 => 147, 1 => 111 ), 'Washington' => array( 0 => 213 ), 'Florida' => array( 0 => 6 ), 'Texas' => array( 0 => 9 ) ), 'Brazil' => array( 'Brasília' => array( 0 => 64 ) ) ) ); function ksort_recursive(&$array) { ksort($array); foreach ( $array as &$a ) { is_array($a) && ksort_recursive($a); } } ksort_recursive($data); print_r($data); ?>

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.0070.00716.50
8.3.50.0100.01217.36
8.3.40.0140.00018.50
8.3.30.0040.01418.54
8.3.20.0060.00918.51
8.3.10.0040.00418.51
8.3.00.0080.00019.25
8.2.180.0040.01118.54
8.2.170.0140.00722.96
8.2.160.0070.00721.15
8.2.150.0110.00724.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00420.88
8.2.110.0060.00320.91
8.2.100.0110.00017.72
8.2.90.0030.00619.30
8.2.80.0050.00319.46
8.2.70.0040.00417.38
8.2.60.0090.00217.89
8.2.50.0060.00318.07
8.2.40.0060.00318.16
8.2.30.0000.00717.98
8.2.20.0000.00817.51
8.2.10.0030.00517.75
8.2.00.0030.00517.65
8.1.280.0090.00925.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.51
8.1.230.0070.00420.96
8.1.220.0000.00817.74
8.1.210.0090.00019.09
8.1.200.0060.00317.35
8.1.190.0000.00817.54
8.1.180.0000.01018.10
8.1.170.0040.00418.71
8.1.160.0000.00718.76
8.1.150.0040.00418.74
8.1.140.0050.00217.46
8.1.130.0000.00717.83
8.1.120.0060.00317.35
8.1.110.0040.00417.41
8.1.100.0040.00417.36
8.1.90.0070.00017.51
8.1.80.0070.00017.45
8.1.70.0030.00317.32
8.1.60.0030.00617.57
8.1.50.0000.00817.36
8.1.40.0040.00417.48
8.1.30.0040.00417.47
8.1.20.0040.00417.54
8.1.10.0070.00017.49
8.1.00.0040.00417.45
8.0.300.0030.00519.82
8.0.290.0070.00016.75
8.0.280.0040.00418.37
8.0.270.0040.00417.13
8.0.260.0000.00616.75
8.0.250.0060.00316.88
8.0.240.0000.00716.95
8.0.230.0040.00416.94
8.0.220.0070.00016.78
8.0.210.0070.00016.77
8.0.200.0000.00616.96
8.0.190.0000.00816.93
8.0.180.0050.00216.90
8.0.170.0030.00616.85
8.0.160.0030.00516.91
8.0.150.0030.00516.84
8.0.140.0040.00416.87
8.0.130.0030.00313.30
8.0.120.0070.00016.83
8.0.110.0040.00416.78
8.0.100.0000.00716.94
8.0.90.0040.00416.79
8.0.80.0030.01216.88
8.0.70.0040.00417.00
8.0.60.0050.00216.73
8.0.50.0000.00716.84
8.0.30.0130.00617.14
8.0.20.0080.01116.81
8.0.10.0040.00417.00
8.0.00.0100.00716.87
7.4.330.0060.00013.00
7.4.320.0030.00316.52
7.4.300.0080.00016.48
7.4.290.0030.00316.48
7.4.280.0040.00416.39
7.4.270.0030.00616.58
7.4.260.0000.00513.23
7.4.250.0030.00516.41
7.4.240.0020.00516.59
7.4.230.0040.00416.40
7.4.220.0100.01416.55
7.4.210.0060.00816.55
7.4.200.0070.00016.66
7.4.190.0000.00716.49
7.4.160.0190.00316.39
7.4.150.0150.00316.33
7.4.140.0090.01116.51
7.4.130.0080.00916.59
7.4.120.0070.01016.53
7.4.110.0090.01216.48
7.4.100.0100.00716.54
7.4.90.0090.00916.56
7.4.80.0030.01319.39
7.4.70.0070.01116.56
7.4.60.0090.00616.62
7.4.50.0000.00916.36
7.4.40.0090.00616.15
7.4.30.0070.01416.60
7.4.00.0040.01414.78
7.3.330.0050.00013.25
7.3.320.0060.00013.25
7.3.310.0000.00616.16
7.3.300.0030.00316.16
7.3.290.0120.00316.32
7.3.280.0080.00816.29
7.3.270.0070.01716.61
7.3.260.0070.01116.21
7.3.250.0120.00816.51
7.3.240.0030.01916.44
7.3.230.0060.01016.46
7.3.210.0080.00816.52
7.3.200.0110.00716.36
7.3.190.0100.00716.36
7.3.180.0160.00016.27
7.3.170.0170.00016.50
7.3.160.0120.00316.51
7.3.120.0060.00914.81
7.3.10.0060.00916.60
7.3.00.0030.00916.37
7.2.330.0080.01816.55
7.2.320.0030.01316.75
7.2.310.0100.01016.71
7.2.300.0030.01216.60
7.2.290.0040.01216.66
7.2.130.0040.00716.78
7.2.120.0040.01216.77
7.2.110.0060.00316.69
7.2.100.0100.00716.48
7.2.90.0040.00716.74
7.2.80.0040.00716.95
7.2.70.0040.01116.84
7.2.60.0090.00616.66
7.2.50.0070.00716.75
7.2.40.0000.01416.97
7.2.30.0030.01016.67
7.2.20.0080.00416.48
7.2.10.0070.00716.94
7.2.00.0050.00918.13
7.1.250.0060.01015.45
7.1.200.0030.00915.91
7.1.100.0060.00917.98
7.1.70.0050.00317.29
7.1.60.0100.01619.40
7.1.50.0070.01416.79
7.1.00.0000.04322.45
7.0.200.0250.00315.05
7.0.140.0100.07021.95
7.0.120.0130.06721.96
7.0.60.0070.08320.02
7.0.50.0130.07717.78
7.0.40.0030.04320.09
7.0.30.0300.08020.34
7.0.20.0300.07320.07
7.0.10.0100.07320.12
7.0.00.0030.08720.15
5.6.210.0100.03720.64
5.6.200.0070.04018.29
5.6.190.0070.08020.61
5.6.180.0430.06020.77
5.6.170.0300.06320.51
5.6.160.0000.05320.57
5.6.150.0030.04018.14
5.6.140.0130.04718.18
5.6.130.0100.08318.17
5.6.120.0030.04021.02
5.6.110.0130.08320.90
5.6.100.0100.07721.00
5.6.90.0130.04321.14
5.6.80.0070.07720.53
5.5.350.0030.03320.45
5.5.340.0100.08017.99
5.5.330.0200.07720.37
5.5.320.3400.04720.27
5.5.310.0230.04320.27
5.5.300.0070.04718.03
5.5.290.0000.04318.00
5.5.280.0100.08020.94
5.5.270.0070.07720.84
5.5.260.0000.09720.86
5.5.250.0100.06020.58
5.5.240.0170.07320.26
5.4.450.0070.07719.58
5.4.440.0130.07019.45
5.4.430.0130.07019.17
5.4.420.0130.07319.18
5.4.410.0100.04019.45
5.4.400.0130.06719.24
5.4.390.0070.06019.14
5.4.380.0070.05019.08
5.4.370.0030.04019.24
5.4.360.0070.04319.14
5.4.350.0070.05319.24
5.4.340.0030.05719.07
5.4.320.0100.07718.87
5.4.310.0100.04019.07
5.4.300.0070.07019.14
5.4.290.0070.04718.85
5.4.280.0100.08019.24
5.4.270.0030.04018.85
5.4.260.0100.06318.89
5.4.250.0100.07018.92
5.4.240.0070.07318.86
5.4.230.0000.04319.16
5.4.220.0030.04719.20
5.4.210.0030.04319.14
5.4.200.0100.04319.13
5.4.190.0000.07718.91
5.4.180.0070.07319.23
5.4.170.0130.05019.14
5.4.160.0130.07319.18
5.4.150.0070.07719.13
5.4.140.0030.07716.32
5.4.130.0030.04316.37
5.4.120.0100.04716.32
5.4.110.0030.07316.45
5.4.100.0030.08016.39
5.4.90.0070.05016.30
5.4.80.0170.06316.65
5.4.70.0070.06716.42
5.4.60.0130.04016.31
5.4.50.0100.07316.36
5.4.40.0030.05016.44
5.4.30.0030.04316.39
5.4.20.0070.05316.39
5.4.10.0130.06716.28
5.4.00.0070.04315.89
5.3.290.0030.08014.83
5.3.280.0070.03714.48
5.3.270.0070.03714.64
5.3.260.0100.07014.68
5.3.250.0030.04714.52
5.3.240.0030.04714.63
5.3.230.0130.07014.60
5.3.220.0030.08014.73
5.3.210.0170.06314.64
5.3.200.0030.07314.56
5.3.190.0030.06314.46
5.3.180.0070.07014.72
5.3.170.0070.06714.45
5.3.160.0000.08014.55
5.3.150.0000.08314.72
5.3.140.0030.07714.55
5.3.130.0000.07714.55
5.3.120.0030.08314.55
5.3.110.0030.07714.59
5.3.100.0000.07014.04
5.3.90.0070.08314.07
5.3.80.0100.05714.04
5.3.70.0030.06014.07
5.3.60.0070.03713.95
5.3.50.0030.07313.96
5.3.40.0130.03313.99
5.3.30.0070.05313.96
5.3.20.0000.05013.61
5.3.10.0000.07313.54
5.3.00.0000.08013.79
5.2.170.0000.03311.14
5.2.160.0030.03311.22
5.2.150.0030.03011.09
5.2.140.0030.03311.16
5.2.130.0130.04311.13
5.2.120.0030.03311.06
5.2.110.0070.03711.11
5.2.100.0030.06011.16
5.2.90.0070.06011.12
5.2.80.0100.05311.15
5.2.70.0000.03711.05
5.2.60.0130.04011.14
5.2.50.0030.06311.18
5.2.40.0030.06311.05
5.2.30.0000.03710.94
5.2.20.0070.03010.92
5.2.10.0030.03310.82
5.2.00.0030.03010.67
5.1.60.0000.0279.98
5.1.50.0100.05010.02
5.1.40.0070.02710.03
5.1.30.0000.03010.33
5.1.20.0070.05310.36
5.1.10.0000.03010.02
5.1.00.0070.05710.07
5.0.50.0070.0338.69
5.0.40.0030.0208.43
5.0.30.0030.0638.13
5.0.20.0030.0238.19
5.0.10.0000.0238.24
5.0.00.0100.0578.13
4.4.90.0030.0377.92
4.4.80.0030.0177.92
4.4.70.0000.0177.92
4.4.60.0030.0177.92
4.4.50.0000.0307.92
4.4.40.0070.0507.92
4.4.30.0070.0177.92
4.4.20.0000.0377.92
4.4.10.0000.0377.92
4.4.00.0000.0337.92
4.3.110.0000.0177.92
4.3.100.0030.0377.92
4.3.90.0070.0207.92
4.3.80.0070.0537.92
4.3.70.0000.0337.92
4.3.60.0130.0237.92
4.3.50.0030.0337.92
4.3.40.0000.0507.92
4.3.30.0000.0377.92
4.3.20.0030.0307.92
4.3.10.0030.0307.92
4.3.00.0000.0377.92

preferences:
45.96 ms | 401 KiB | 5 Q