3v4l.org

run code in 200+ php & hhvm versions
<?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.2.6
[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 hhvm-3.18.5 - 3.22.0
[3,2,1] [4,3,2,1] [5,4,3,2,1] [6,5,4,3,2,1] [7,6,5,4,3,2,1] [8,7,6,5,4,3,2,1] [9,8,7,6,5,4,3,2,1] [10,9,8,7,6,5,4,3,2,1] [11,10,9,8,7,6,5,4,3,2,1] [12,11,10,9,8,7,6,5,4,3,2,1] [13,12,11,10,9,8,7,6,5,4,3,2,1] [14,13,12,11,10,9,8,7,6,5,4,3,2,1] [15,14,13,12,11,10,9,8,7,6,5,4,3,2,1] [16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1] [15,14,13,12,11,10,2,8,7,6,5,4,3,16,17,9,1] [16,15,14,13,12,11,2,9,8,7,6,5,4,3,17,18,10,1] [15,14,13,12,11,2,18,8,7,6,5,4,3,16,17,9,19,10,1] [16,15,14,13,12,2,19,9,8,7,6,5,4,3,17,18,10,20,11,1]
Output for 5.6.0 - 5.6.30
[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]