3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sort_custom(&$array) { $hierarchy = array_flip([ "organization", "company", "group", "unit", "sub_unit", "team" ]); uksort($array, fn($a, $b) => $hierarchy[$a] <=> $hierarchy[$b]); } $array = [ "team" => "team1", "organization" => "organization1", "group" => "group1" ]; sort_custom($array); var_export($array);

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.4.120.0110.00820.50
8.4.110.0080.01322.49
8.4.100.0050.00517.96
8.4.90.0130.00818.86
8.4.80.0080.00417.68
8.4.70.0140.01017.68
8.4.60.0160.00418.75
8.4.50.0100.00819.51
8.4.40.0100.01019.45
8.4.30.0090.01120.62
8.4.20.0100.00719.60
8.4.10.0160.00323.95
8.3.250.0090.01019.06
8.3.240.0140.00517.17
8.3.230.0120.00716.54
8.3.220.0030.00717.31
8.3.210.0120.00816.66
8.3.200.0060.00316.38
8.3.190.0100.00519.22
8.3.180.0050.00316.41
8.3.170.0120.00619.03
8.3.160.0090.00916.63
8.3.150.0060.00618.99
8.3.140.0080.00016.66
8.3.130.0090.00916.80
8.3.120.0060.00918.78
8.3.110.0070.01116.48
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0100.00317.97
8.3.70.0110.01118.18
8.3.60.0060.00918.30
8.3.50.0090.00916.42
8.3.40.0110.00420.32
8.3.30.0120.00318.71
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0060.00720.75
8.2.280.0060.00218.42
8.2.270.0060.01218.82
8.2.260.0090.00918.41
8.2.250.0050.00316.63
8.2.240.0040.01518.98
8.2.230.0090.00020.94
8.2.220.0090.00937.54
8.2.210.0040.00426.77
8.2.200.0070.01118.16
8.2.190.0090.00616.63
8.2.180.0040.01116.50
8.2.170.0100.01018.96
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0110.00424.66
8.2.130.0120.00427.44
8.2.120.0050.00326.16
8.2.110.0070.00419.33
8.2.100.0090.00317.66
8.2.90.0090.00719.22
8.2.80.0080.00018.04
8.2.70.0060.00318.03
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00918.07
8.2.30.0000.00818.15
8.2.20.0030.00617.81
8.2.10.0160.00517.75
8.2.00.0090.01317.72
8.1.330.0100.00821.95
8.1.320.0090.01016.33
8.1.310.0070.01018.36
8.1.300.0050.00318.36
8.1.290.0180.00030.84
8.1.280.0070.01425.92
8.1.270.0070.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00820.53
8.1.230.0040.00723.84
8.1.220.0090.00017.74
8.1.210.0080.00018.88
8.1.200.0080.00417.48
8.1.190.0050.00317.22
8.1.180.0050.00318.10
8.1.170.0040.00418.51
8.1.160.0030.00518.82
8.1.150.0100.00717.40
8.1.140.0140.00217.45
8.1.130.0110.00517.45
8.1.120.0140.00317.50
8.1.110.0070.00917.52
8.1.100.0090.00817.42
8.1.90.0110.00617.51
8.1.80.0100.00717.51
8.1.70.0120.00417.39
8.1.60.0060.01217.59
8.1.50.0130.00917.46
8.1.40.0140.00617.55
8.1.30.0170.00317.62
8.1.20.0120.00817.63
8.1.10.0070.01117.50
8.1.00.0160.00317.58
8.0.300.0070.00019.90
8.0.290.0040.00416.63
8.0.280.0070.00018.43
8.0.270.0000.01716.77
8.0.260.0100.00516.70
8.0.250.0090.00416.82
8.0.240.0070.00716.76
8.0.230.0160.00016.82
8.0.220.0120.00316.80
8.0.210.0160.00016.80
8.0.200.0110.00416.76
8.0.190.0110.00016.76
8.0.180.0080.00316.91
8.0.170.0060.00316.90
8.0.160.0090.00016.88
8.0.150.0050.00316.80
8.0.140.0100.00016.83
8.0.130.0030.00916.82
8.0.120.0060.00616.83
8.0.110.0140.00016.75
8.0.100.0150.00016.80
8.0.90.0150.00016.68
8.0.80.0100.00516.80
8.0.70.0100.00416.79
8.0.60.0080.00816.66
8.0.50.0090.00616.72
8.0.30.0120.00416.79
8.0.20.0160.00016.92
8.0.10.0120.00416.89
7.4.330.0080.00316.58
7.4.100.0160.00717.95
7.1.00.0180.00314.83
7.0.00.0180.00714.58
5.6.400.0080.00216.52

preferences:
27.87 ms | 403 KiB | 5 Q