3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1,2,3,4,5,6,1,2,3,4,5,6]; asort($a); print_r($a);
based on 3VkoG
Output for 7.0.0 - 7.2.0
Array ( [6] => 1 [0] => 1 [1] => 2 [7] => 2 [2] => 3 [8] => 3 [3] => 4 [9] => 4 [4] => 5 [10] => 5 [5] => 6 [11] => 6 )
Output for 5.5.0 - 5.6.28
Array ( [6] => 1 [0] => 1 [7] => 2 [1] => 2 [8] => 3 [2] => 3 [9] => 4 [3] => 4 [4] => 5 [10] => 5 [11] => 6 [5] => 6 )