3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( 'pippo', 'franco', 'marco' => 'polo', 'ciao' ); print_r($array); reset($array); asort($array, SORT_NUMERIC); reset($array); print_r($array);
Output for 7.0.0 - 7.3.0rc4
Array ( [0] => pippo [1] => franco [marco] => polo [2] => ciao ) Array ( [0] => pippo [1] => franco [marco] => polo [2] => ciao )
Output for 4.3.0 - 5.6.28
Array ( [0] => pippo [1] => franco [marco] => polo [2] => ciao ) Array ( [2] => ciao [marco] => polo [1] => franco [0] => pippo )