3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array ( '9279741067265' => array ( 'sorting' => 65 ), '9278151524353' => array ( 'sorting' => 0.77 ), '9279740739585' => array ( 'sorting' => 0.68410355 ), '9279730974721' => array ( 'sorting' => 0.3763495396839 ), '9279753125889' => array ( 'sorting' => 0.37579056634306 ), '9279727042561' => array ( 'sorting' => 0.37516783460064 ), '9279725240321' => array ( 'sorting' => 0.37487223764217 ), '9279753846785' => array ( 'sorting' => 0.37485139720698 ), '9279725076481' => array ( 'sorting' => 0.37473267790189 ), '9279738642433' => array ( 'sorting' => 0.37469843689144 ), );; $keys = array_keys($array); array_multisort( array_column($array, 'sorting'), SORT_DESC, SORT_NUMERIC, $array, $keys ); $array = array_combine($keys, $array); print_r($array);
based on 5ICD6
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Array ( [9279741067265] => Array ( [sorting] => 65 ) [9278151524353] => Array ( [sorting] => 0.77 ) [9279740739585] => Array ( [sorting] => 0.68410355 ) [9279730974721] => Array ( [sorting] => 0.3763495396839 ) [9279753125889] => Array ( [sorting] => 0.37579056634306 ) [9279727042561] => Array ( [sorting] => 0.37516783460064 ) [9279725240321] => Array ( [sorting] => 0.37487223764217 ) [9279753846785] => Array ( [sorting] => 0.37485139720698 ) [9279725076481] => Array ( [sorting] => 0.37473267790189 ) [9279738642433] => Array ( [sorting] => 0.37469843689144 ) )