3v4l.org

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

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:
40.72 ms | 403 KiB | 8 Q