3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ "hrid" => 1, "masterroom" => "B4-G-3" ], [ "hrid" => 2, "masterroom" => "B4-G-1" ], [ "hrid" => 7, "masterroom" => "B4-1-2" ], [ "hrid" => 8, "masterroom" => "B4-1-1" ], [ "hrid" => 9, "masterroom" => "B4-1-10" ], [ "hrid" => 10, "masterroom" => "B4-G-10" ] ]; $masterroom = array_column($array, 'masterroom'); $hrid = array_column($array, 'hrid'); array_multisort($masterroom, SORT_NATURAL, $hrid, SORT_ASC, $array); var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> array(2) { ["hrid"]=> int(8) ["masterroom"]=> string(6) "B4-1-1" } [1]=> array(2) { ["hrid"]=> int(7) ["masterroom"]=> string(6) "B4-1-2" } [2]=> array(2) { ["hrid"]=> int(9) ["masterroom"]=> string(7) "B4-1-10" } [3]=> array(2) { ["hrid"]=> int(2) ["masterroom"]=> string(6) "B4-G-1" } [4]=> array(2) { ["hrid"]=> int(1) ["masterroom"]=> string(6) "B4-G-3" } [5]=> array(2) { ["hrid"]=> int(10) ["masterroom"]=> string(7) "B4-G-10" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
192.8 ms | 407 KiB | 5 Q