3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a[0][0] = 5; $a[1][1] = 3; $a[2][2] = 6; $a[3][3] = 2; $a[4][4] = 4; array_multisort($a); print_r($a); ?>
Output for 7.1.0
Array ( [0] => Array ( [4] => 4 ) [1] => Array ( [3] => 2 ) [2] => Array ( [1] => 3 ) [3] => Array ( [2] => 6 ) [4] => Array ( [0] => 5 ) )
Output for 4.3.0 - 7.0.14
Array ( [0] => Array ( [3] => 2 ) [1] => Array ( [1] => 3 ) [2] => Array ( [0] => 5 ) [3] => Array ( [2] => 6 ) [4] => Array ( [4] => 4 ) )