3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(0 => 'a', 'str' => 'b'); $b = array('str' => 'b', 0 => 'a'); ksort($a); ksort($b); var_export($a); var_export($b);
Output for 7.0.0 - 7.1.0
array ( 0 => 'a', 'str' => 'b', )array ( 'str' => 'b', 0 => 'a', )
Output for 4.3.0 - 5.6.28
array ( 'str' => 'b', 0 => 'a', )array ( 0 => 'a', 'str' => 'b', )