3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '2' => [ 'title' => 'Flower', 'order' => 3 ], '3' => [ 'title' => 'Rock', 'order' => 1 ], '4' => [ 'title' => 'Grass', 'order' => 2 ] ]; $keys = array_keys($array); array_multisort( array_column($array, 'order'), SORT_DESC, SORT_NUMERIC, $array, $keys ); $array = array_combine($keys, $array); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [2] => Array ( [title] => Flower [order] => 3 ) [4] => Array ( [title] => Grass [order] => 2 ) [3] => Array ( [title] => Rock [order] => 1 ) )

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:
34.83 ms | 406 KiB | 5 Q