3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $id = '01110413'; $ltr = array('00' => 'A', '01' => 'B', '010' => 'X', '03' => 'C', '04' => 'D'); var_dump( $ltr ); ksort($ltr); var_dump( $ltr );
Output for 4.3.0 - 7.1.7
array(5) { ["00"]=> string(1) "A" ["01"]=> string(1) "B" ["010"]=> string(1) "X" ["03"]=> string(1) "C" ["04"]=> string(1) "D" } array(5) { ["00"]=> string(1) "A" ["01"]=> string(1) "B" ["03"]=> string(1) "C" ["04"]=> string(1) "D" ["010"]=> string(1) "X" }