<?php
function test($array) {
usort($array, function($a, $b) { return 1; });
echo json_encode($array), PHP_EOL;
}
for ($i = 3; $i <= 20; $i++) {
test(range(1, $i));
}
- Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- [2,3,1]
[4,2,3,1]
[5,4,2,3,1]
[6,5,4,3,2,1]
[6,7,5,4,3,2,1]
[8,6,7,5,4,3,2,1]
[8,9,6,7,5,4,3,2,1]
[10,8,9,6,7,5,4,3,2,1]
[10,11,8,9,6,7,5,4,3,2,1]
[12,10,11,8,9,6,7,5,4,3,2,1]
[12,13,10,11,8,9,6,7,5,4,3,2,1]
[14,12,13,10,11,8,9,6,7,5,4,3,2,1]
[14,15,12,13,10,11,8,9,6,7,5,4,3,2,1]
[16,14,15,12,13,10,11,8,9,6,7,5,4,3,2,1]
[14,15,12,13,10,11,8,2,6,7,5,4,3,16,9,17,1]
[16,14,15,12,13,2,11,8,9,6,7,5,4,3,17,10,18,1]
[14,15,12,13,2,11,8,18,6,7,5,4,3,16,9,17,10,19,1]
[16,14,15,12,13,19,2,8,9,6,7,5,4,3,17,10,18,11,20,1]
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
- [1,2,3]
[3,1,2,4]
[4,2,1,3,5]
[1,5,2,4,3,6]
[1,2,6,3,5,4,7]
[7,5,2,1,3,6,4,8]
[8,2,6,3,1,4,7,5,9]
[7,1,2,9,3,6,4,8,5,10]
[8,2,1,3,10,4,7,5,9,6,11]
[7,11,2,9,3,1,4,8,5,10,6,12]
[8,2,12,3,10,4,1,5,9,6,11,7,13]
[1,11,2,9,3,13,4,8,5,10,6,12,7,14]
[1,2,12,3,10,4,14,5,9,6,11,7,13,8,15]
[15,11,2,9,3,13,4,1,5,10,6,12,7,14,8,16]
[16,2,12,3,10,4,14,5,1,6,11,7,13,8,15,9,17]
[15,11,2,1,3,13,4,17,5,10,6,12,7,14,8,16,9,18]
[16,2,12,3,1,4,14,5,18,6,11,7,13,8,15,9,17,10,19]
[15,11,2,19,3,13,4,17,5,1,6,12,7,14,8,16,9,18,10,20]
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Parse error: syntax error, unexpected T_FUNCTION in /in/WiTC0 on line 4
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_FUNCTION in /in/WiTC0 on line 4
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/WiTC0 on line 4
Process exited with code 255.
preferences:
157.86 ms | 412 KiB | 5 Q