3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr1 = array( "2179454040" => "127.0.0.1:6379", "2159827012" => "127.0.0.1:6380", "2171050562" => "127.0.0.1:6380", "2153052555" => "127.0.0.1:6381", "2171236323" => "127.0.0.1:6381", "2162841922" => "127.0.0.1:6381", "2173346807" => "127.0.0.1:6382", "2171411418" => "127.0.0.1:6382", "2151534559" => "127.0.0.1:6382" ); /* for ($i = 0; $i < count($arr1); $i++) { ksort($arr1[$i], SORT_NUMERIC); } */ var_dump($arr1);
Output for 4.3.0 - 7.1.0
array(9) { [2179454040]=> string(14) "127.0.0.1:6379" [2159827012]=> string(14) "127.0.0.1:6380" [2171050562]=> string(14) "127.0.0.1:6380" [2153052555]=> string(14) "127.0.0.1:6381" [2171236323]=> string(14) "127.0.0.1:6381" [2162841922]=> string(14) "127.0.0.1:6381" [2173346807]=> string(14) "127.0.0.1:6382" [2171411418]=> string(14) "127.0.0.1:6382" [2151534559]=> string(14) "127.0.0.1:6382" }