3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data[] = array('volume' => 67, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 1); $data[] = array('volume' => 85, 'edition' => 6); $data[] = array('volume' => 98, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 6); $data[] = array('volume' => 67, 'edition' => 7); foreach ($data as $key => $row) { $volume[$key] = $row['volume']; $edition[$key] = $row['edition']; } echo '<pre>'; print_r($volume); echo '<br /> edition'; print_r($edition); $result=array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data); print_r($result);
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<pre>Array ( [0] => 67 [1] => 86 [2] => 85 [3] => 98 [4] => 86 [5] => 67 ) <br /> editionArray ( [0] => 2 [1] => 1 [2] => 6 [3] => 2 [4] => 6 [5] => 7 ) 1
Output for hhvm-3.10.0

Process exited with code 153.