3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data1=array('date'=>'2 November 2013','name'=>'Ian Dear','amount'=>500000); $data2=array('date'=>'6 November 2013','name'=>'Bobvinder Sira','amount'=>3075000); $data3=array('date'=>'9 November 2013','name'=>'Abigail Jones','amount'=>2005000); $data4=array('date'=>'13 November 2013','name'=>'John Smith','amount'=>1875000); $num=array_merge($data1,$data2,$data3,$data4); array_multisort($num,SORT_DESC,SORT_NUMERIC); print_r($data1); print_r($data2); print_r($data3); print_r($data4); ?>
Output for 4.3.0 - 7.1.0
Array ( [date] => 2 November 2013 [name] => Ian Dear [amount] => 500000 ) Array ( [date] => 6 November 2013 [name] => Bobvinder Sira [amount] => 3075000 ) Array ( [date] => 9 November 2013 [name] => Abigail Jones [amount] => 2005000 ) Array ( [date] => 13 November 2013 [name] => John Smith [amount] => 1875000 )