3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $alternatives = array( 'foo:bar' => 1, 'foo:bar1' => 1, 'foo1:bar' => -4, ); asort($alternatives); print_r($alternatives); print_r(array_keys($alternatives));
Output for 7.0.0 - 7.2.0
Array ( [foo1:bar] => -4 [foo:bar] => 1 [foo:bar1] => 1 ) Array ( [0] => foo1:bar [1] => foo:bar [2] => foo:bar1 )
Output for 5.3.18 - 5.6.28
Array ( [foo1:bar] => -4 [foo:bar1] => 1 [foo:bar] => 1 ) Array ( [0] => foo1:bar [1] => foo:bar1 [2] => foo:bar )