3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_alternate_multisort($array, ...$args) { foreach ($args as $i => $arg) { $sortParams[] = $i & 1 ? $arg : array_column($array, $arg); } $sortParams[] = &$array; array_multisort(...$sortParams); return $array; } $alliances = [ ['id' => 1, 'output' => '1', 'score' => 10], ['id' => 2, 'output' => '0', 'score' => 9], ['id' => 3, 'output' => '1', 'score' => 11], ['id' => 4, 'output' => '1', 'score' => 9], ['id' => 5, 'output' => '0', 'score' => 10], ]; $alliances = array_alternate_multisort($alliances, "output", SORT_DESC, "score", SORT_DESC); var_export($alliances);

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.10.0080.00419.32
8.3.140.0050.00317.22
8.3.130.0150.00418.51
8.3.120.0120.00818.96
8.3.110.0080.00020.94
8.3.100.0030.00624.06
8.3.90.0080.00026.77
8.3.80.0090.00019.36
8.3.70.0060.01018.43
8.3.60.0160.00618.43
8.3.50.0070.01124.62
8.3.40.0150.00718.80
8.3.30.0120.00318.67
8.3.20.0070.00024.18
8.3.10.0000.00924.66
8.3.00.0000.00826.16
8.2.260.0100.01016.65
8.2.250.0080.00019.10
8.2.240.0060.00318.84
8.2.230.0000.00822.58
8.2.220.0060.00337.54
8.2.210.0060.00626.77
8.2.200.0000.01018.88
8.2.190.0070.00717.00
8.2.180.0140.00725.92
8.2.170.0090.00619.09
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00026.35
8.2.110.0030.00621.00
8.2.100.0070.00417.91
8.2.90.0000.01017.38
8.2.80.0040.00418.82
8.2.70.0030.00717.62
8.2.60.0040.00418.05
8.2.50.0000.00818.05
8.2.40.0000.00818.22
8.2.30.0080.00018.05
8.2.20.0040.00418.12
8.2.10.0040.00419.34
8.2.00.0040.00419.19
8.1.310.0070.00018.52
8.1.300.0040.00418.45
8.1.290.0030.00630.84
8.1.280.0090.00925.92
8.1.270.0040.00423.99
8.1.260.0060.00328.09
8.1.250.0070.00028.09
8.1.240.0040.00419.55
8.1.230.0120.00017.57
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0050.00517.36
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0080.00018.49
8.1.160.0040.00418.96
8.1.150.0030.00618.81
8.1.140.0070.00018.90
8.1.130.0080.00017.48
8.1.120.0040.00417.48
8.1.110.0040.00417.50
8.1.100.0040.00417.45
8.1.90.0000.00717.51
8.1.80.0030.00617.36
8.1.70.0030.00517.51
8.1.60.0040.00417.59
8.1.50.0080.00017.57
8.1.40.0040.00417.52
8.1.30.0040.00417.64
8.1.20.0050.00517.49
8.1.10.0040.00417.48
8.1.00.0040.00417.49
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.36
8.0.270.0040.00417.89
8.0.260.0040.00416.75
8.0.250.0000.00716.96
8.0.240.0030.00716.88
8.0.230.0000.00616.86
8.0.220.0030.00716.92
8.0.210.0070.00016.83
8.0.200.0050.00316.95
8.0.190.0030.00516.86
8.0.180.0050.00216.93
8.0.170.0030.00616.93
8.0.160.0040.00416.99
8.0.150.0000.00716.89
8.0.140.0000.00716.87
8.0.130.0060.00013.29
8.0.120.0030.00616.86
8.0.110.0030.00316.82
8.0.100.0000.00816.89
8.0.90.0080.00016.74
8.0.80.0130.00716.87
8.0.70.0050.00316.70
8.0.60.0050.00316.95
8.0.50.0040.00416.78
8.0.30.0100.01317.11
8.0.20.0140.00916.88
8.0.10.0030.00516.80
8.0.00.0140.00716.71
7.4.330.0030.00315.55
7.4.320.0060.00016.52
7.4.300.0060.00016.50
7.4.290.0030.00516.50
7.4.280.0060.00316.60
7.4.270.0040.00416.46
7.4.260.0050.00013.30
7.4.250.0000.00816.40
7.4.240.0070.00016.62
7.4.230.0040.00416.54
7.4.220.0030.00316.51
7.4.210.0080.00716.57
7.4.200.0050.00216.61
7.4.130.0090.00816.58
7.4.120.0100.00716.55
7.4.110.0130.00316.81
7.4.100.0050.01116.64
7.4.90.0100.00716.51
7.4.80.0120.01319.39
7.4.70.0240.00816.51
7.4.60.0230.01516.56
7.4.50.0350.00416.49
7.4.40.0290.00416.36
7.4.30.0170.01316.40
7.4.20.0220.01016.61
7.4.10.0240.00516.57
7.4.00.0120.00616.48
7.3.330.0060.00016.51
7.3.320.0000.00513.40
7.3.310.0080.00016.27
7.3.300.0060.00016.30
7.3.290.0080.00816.38
7.3.260.0160.00716.50
7.3.240.0120.00616.42
7.3.230.0100.00616.63
7.3.210.0110.00716.30
7.3.200.0130.00316.46
7.3.190.0320.00516.49
7.3.180.0320.00916.44
7.3.170.0310.00716.66
7.3.160.0280.00416.41
7.3.150.0190.01216.29
7.3.140.0380.01416.39
7.3.130.0220.01916.40
7.3.120.0280.00616.48
7.3.110.0210.01416.30
7.3.100.0290.00416.33
7.3.90.0250.00816.67
7.3.80.0250.00816.49
7.3.70.0290.00616.33
7.3.60.0310.00316.32
7.3.50.0200.01316.55
7.3.40.0210.01616.34
7.3.30.0180.01816.45
7.3.20.0260.00916.20
7.3.10.0260.01316.27
7.3.00.0240.01416.41
7.2.330.0000.01616.68
7.2.320.0100.00716.74
7.2.310.0240.00916.78
7.2.300.0230.00816.74
7.2.290.0210.01216.74
7.2.280.0260.00516.73
7.2.270.0220.01116.77
7.2.260.0270.01016.50
7.2.250.0300.00416.49
7.2.240.0190.01016.78
7.2.230.0260.00416.80
7.2.220.0170.01516.70
7.2.210.0310.00716.60
7.2.200.0190.01116.57
7.2.190.0200.01516.57
7.2.180.0310.00016.62
7.2.170.0310.00816.72
7.2.160.0150.02116.74
7.2.150.0200.01316.63
7.2.140.0360.00616.62
7.2.130.0280.01116.62
7.2.120.0280.01216.62
7.2.110.0270.01016.66
7.2.100.0240.01016.70
7.2.90.0290.00716.51
7.2.80.0220.01016.68
7.2.70.0200.00716.49
7.2.60.0200.01316.67
7.2.50.0220.01916.72
7.2.40.0210.01316.62
7.2.30.0210.00716.82
7.2.20.0150.01116.41
7.2.10.0250.00316.69
7.2.00.0230.00716.55

preferences:
28.83 ms | 403 KiB | 5 Q