3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( "texas" => array( "withers field" => array("name" => "beam pump 1"), "withers field B" => array("name" => "beam pump 1") ) ); function multiLevelSort($arr) { if (!is_array($arr)) { return $arr; } else { $arr = ksort($arr,SORT_STRING); foreach ($arr as $val) { $val = multiLevelSort($val); } } } echo(multiLevelSort($test)); ?>

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.01116.63
8.3.50.0140.00622.89
8.3.40.0120.00318.88
8.3.30.0100.00319.05
8.3.20.0040.00420.25
8.3.10.0080.00021.77
8.3.00.0040.00419.55
8.2.180.0100.01018.42
8.2.170.0120.00622.96
8.2.160.0000.01419.20
8.2.150.0040.00424.18
8.2.140.0120.00324.66
8.2.130.0050.00326.16
8.2.120.0070.01121.14
8.2.110.0060.00322.11
8.2.100.0070.00417.72
8.2.90.0030.00619.23
8.2.80.0040.00419.28
8.2.70.0090.00017.48
8.2.60.0000.00817.89
8.2.50.0030.00518.07
8.2.40.0000.00918.16
8.2.30.0000.00817.93
8.2.20.0070.00017.67
8.2.10.0040.00418.18
8.2.00.0040.00417.75
8.1.280.0110.00725.92
8.1.270.0040.00421.93
8.1.260.0140.00326.35
8.1.250.0070.00328.09
8.1.240.0060.00323.74
8.1.230.0090.00318.99
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.43
8.1.180.0080.00018.88
8.1.170.0040.00418.45
8.1.160.0040.00422.14
8.1.150.0040.00418.90
8.1.140.0000.00717.45
8.1.130.0030.00317.74
8.1.120.0000.00717.43
8.1.110.0040.00417.50
8.1.100.0030.00317.46
8.1.90.0040.00417.47
8.1.80.0050.00317.45
8.1.70.0000.00817.30
8.1.60.0060.00317.54
8.1.50.0040.00417.52
8.1.40.0080.00417.52
8.1.30.0040.00417.55
8.1.20.0040.00417.58
8.1.10.0030.00617.42
8.1.00.0030.00617.43
8.0.300.0040.00418.77
8.0.290.0030.00617.18
8.0.280.0070.00018.45
8.0.270.0000.00717.20
8.0.260.0080.00017.27
8.0.250.0030.00317.04
8.0.240.0000.00617.01
8.0.230.0060.00017.04
8.0.220.0070.00016.95
8.0.210.0030.00316.87
8.0.200.0040.00417.01
8.0.190.0060.00617.05
8.0.180.0040.00416.98
8.0.170.0000.00816.95
8.0.160.0000.00716.86
8.0.150.0000.00816.84
8.0.140.0050.00216.87
8.0.130.0050.00213.44
8.0.120.0040.00416.93
8.0.110.0040.00416.96
8.0.100.0000.00716.89
8.0.90.0040.00416.79
8.0.80.0070.01017.01
8.0.70.0070.00017.06
8.0.60.0070.00016.75
8.0.50.0000.00716.74
8.0.30.0080.01017.09
8.0.20.0130.00517.40
8.0.10.0050.00216.88
8.0.00.0080.01016.65
7.4.330.0000.00415.02
7.4.320.0070.00016.50
7.4.300.0000.00616.48
7.4.290.0070.00016.43
7.4.280.0000.00816.40
7.4.270.0040.00416.60
7.4.260.0040.00416.45
7.4.250.0030.00516.57
7.4.240.0040.00416.59
7.4.230.0070.00016.68
7.4.220.0100.00716.61
7.4.210.0090.00616.52
7.4.200.0030.00316.41
7.4.160.0060.01616.46
7.4.150.0050.01317.40
7.4.140.0100.01217.86
7.4.130.0070.01016.63
7.4.120.0110.00616.60
7.4.110.0060.01216.49
7.4.100.0170.00316.70
7.4.90.0100.00716.48
7.4.80.0130.00919.39
7.4.70.0130.01016.61
7.4.60.0080.00816.47
7.4.50.0070.00316.52
7.4.40.0030.01416.54
7.4.30.0080.01416.59
7.4.00.0030.01014.85
7.3.330.0000.00613.32
7.3.320.0030.00313.21
7.3.310.0070.00016.27
7.3.300.0030.00316.36
7.3.290.0100.00716.32
7.3.280.0070.00916.39
7.3.270.0130.00317.40
7.3.260.0090.00916.57
7.3.250.0120.00616.46
7.3.240.0140.00716.57
7.3.230.0110.00616.59
7.3.210.0070.01016.32
7.3.200.0180.00019.39
7.3.190.0110.00516.58
7.3.180.0060.01016.63
7.3.170.0130.00316.50
7.3.160.0080.00816.53
7.3.10.0070.00316.61
7.3.00.0040.00416.65
7.2.330.0070.01116.77
7.2.320.0080.00816.65
7.2.310.0150.00816.70
7.2.300.0170.00016.61
7.2.290.0120.00616.49
7.2.130.0060.01016.59
7.2.120.0000.01316.90
7.2.110.0030.00916.67
7.2.100.0030.01016.93
7.2.90.0040.00817.00
7.2.80.0040.00716.96
7.2.70.0070.01017.05
7.2.60.0060.00616.85
7.2.50.0030.01016.95
7.2.40.0030.01316.83
7.2.30.0090.00616.89
7.2.20.0030.00916.90
7.2.10.0090.00316.71
7.2.00.0060.00618.13
7.1.250.0040.00815.86
7.1.100.0090.00917.83
7.1.70.0100.00716.73
7.1.60.0120.01219.34
7.1.50.0040.00716.93
7.1.00.0070.07022.28
7.0.200.0050.00216.63
7.0.140.0030.05021.95
7.0.60.0100.08319.99
7.0.50.0000.06317.85
7.0.40.0030.04720.13
7.0.30.0370.04720.11
7.0.20.0370.06020.08
7.0.10.0070.08020.25
7.0.00.0030.07720.23
5.6.280.0100.06720.82
5.6.210.0070.05720.52
5.6.200.0130.05018.25
5.6.190.0030.05320.34
5.6.180.0070.07720.51
5.6.170.0200.04020.55
5.6.160.0100.08020.57
5.6.150.0030.08318.18
5.6.140.0130.07018.18
5.6.130.0030.04018.15
5.6.120.0130.03721.05
5.6.110.0100.07721.01
5.6.100.0070.03721.14
5.6.90.0030.07321.00
5.6.80.0300.07020.49
5.5.350.3600.03720.38
5.5.340.0030.08717.99
5.5.330.0130.07020.41
5.5.320.0200.04020.42
5.5.310.0100.08320.24
5.5.300.0170.07317.92
5.5.290.0070.08717.98
5.5.280.0100.06320.88
5.5.270.0100.08720.87
5.5.260.0030.06320.76
5.5.250.0170.04020.59
5.5.240.0130.04020.19
5.4.450.0370.05719.47
5.4.440.0630.05719.63
5.4.430.0100.05319.32
5.4.420.0170.04719.36
5.4.410.0100.06719.21
5.4.400.0070.05319.26
5.4.390.0100.05019.12
5.4.380.0000.06019.07
5.4.370.0130.05319.02
5.4.360.0070.05319.13
5.4.350.0030.03713.78
5.4.340.0030.04013.86
5.4.320.0100.03314.35
5.4.310.0030.04014.29
5.4.300.0070.03714.48
5.4.290.0030.04014.42
5.4.280.0030.04014.16
5.4.270.0000.04014.32
5.4.260.0030.04014.28
5.4.250.0030.04014.11
5.4.240.0000.04314.16
5.4.230.0070.03714.18
5.4.220.0100.03014.39
5.4.210.0030.04014.18
5.4.200.0030.04014.16
5.4.190.0170.03314.18
5.4.180.0100.03014.16
5.4.170.0070.04014.16
5.4.160.0070.03714.28
5.4.150.0130.03714.09
5.4.140.0000.05014.07
5.4.130.0000.04313.82
5.4.120.0100.03713.86
5.4.110.0000.04013.71
5.4.100.0100.04013.77
5.4.90.0070.04013.77
5.4.80.0100.03713.80
5.4.70.0030.03713.75
5.4.60.0000.04013.85
5.4.50.0070.03713.77
5.4.40.0000.04013.70
5.4.30.0030.03713.80
5.4.20.0030.03713.73
5.4.10.0130.03013.77
5.4.00.0000.04313.48
5.3.290.0100.04014.71
5.3.280.0070.04314.57
5.3.270.0200.03714.65
5.3.260.0070.04714.59
5.3.250.0070.04014.52
5.3.240.0070.03714.75
5.3.230.0100.03714.70
5.3.220.0130.04714.50
5.3.210.0100.04714.53
5.3.200.0030.04314.60
5.3.190.0100.03314.52
5.3.180.0070.03714.60
5.3.170.0100.03314.55
5.3.160.0070.03714.58
5.3.150.0100.04014.55
5.3.140.0100.04014.58
5.3.130.0070.04014.73
5.3.120.0070.04314.52
5.3.110.0000.04714.70
5.3.100.0030.04713.95
5.3.90.0030.04714.03
5.3.80.0000.04014.18
5.3.70.0030.04014.00
5.3.60.0100.03314.12
5.3.50.0000.04013.89
5.3.40.0100.03313.94
5.3.30.0000.04013.95
5.3.20.0070.03713.74
5.3.10.0000.04013.71
5.3.00.0030.03713.67
5.2.170.0000.03311.20
5.2.160.0000.03311.12
5.2.150.0000.03711.21
5.2.140.0070.03011.10
5.2.130.0030.03311.22
5.2.120.0070.02711.08
5.2.110.0030.03011.02
5.2.100.0030.03311.24
5.2.90.0030.03011.16
5.2.80.0070.02711.08
5.2.70.0030.03311.23
5.2.60.0030.03311.11
5.2.50.0030.03011.17
5.2.40.0070.02711.16
5.2.30.0070.03310.95
5.2.20.0170.03010.94
5.2.10.0100.02310.89
5.2.00.0070.03010.71
5.1.60.0070.02310.07
5.1.50.0100.02710.04
5.1.40.0030.0279.99
5.1.30.0030.03310.26
5.1.20.0030.03010.28
5.1.10.0070.02710.14
5.1.00.0030.03010.05
5.0.50.0100.0178.56
5.0.40.0000.0238.39
5.0.30.0000.0378.15
5.0.20.0000.0238.17
5.0.10.0000.0278.19
5.0.00.0030.0378.14
4.4.90.0000.0175.90
4.4.80.0000.0175.80
4.4.70.0000.0205.84
4.4.60.0030.0135.85
4.4.50.0000.0175.82
4.4.40.0030.0235.85
4.4.30.0000.0175.91
4.4.20.0000.0275.87
4.4.10.0000.0205.88
4.4.00.0130.0305.85
4.3.110.0000.0175.77
4.3.100.0030.0205.76
4.3.90.0030.0175.81
4.3.80.0000.0275.82
4.3.70.0000.0175.74
4.3.60.0070.0175.73
4.3.50.0070.0135.75
4.3.40.0070.0235.70
4.3.30.0000.0174.54
4.3.20.0000.0204.51
4.3.10.0030.0134.43
4.3.00.0100.0207.05

preferences:
62.87 ms | 401 KiB | 5 Q