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; asort($a); print_r($a); ?>
Output for 7.0.0 - 7.1.0
Array ( [4] => Array ( [4] => 4 ) [3] => Array ( [3] => 2 ) [1] => Array ( [1] => 3 ) [2] => Array ( [2] => 6 ) [0] => Array ( [0] => 5 ) )
Output for hhvm-3.12.0
Array ( [0] => Array ( [0] => 5 ) [1] => Array ( [1] => 3 ) [2] => Array ( [2] => 6 ) [3] => Array ( [3] => 2 ) [4] => Array ( [4] => 4 ) )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.6.28
Array ( [3] => Array ( [3] => 2 ) [1] => Array ( [1] => 3 ) [0] => Array ( [0] => 5 ) [2] => Array ( [2] => 6 ) [4] => Array ( [4] => 4 ) )