3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 1 => ['Name' => 'John', 'Age' => '20', 'Code' => 'ABC 12'], 2 => ['Name' => 'John', 'Age' => '21', 'Code' => 'ABC 1'], 3 => ['Name' => 'Mary', 'Age' => '20', 'Code' => 'ABC 10'], 4 => ['Name' => 'John', 'Age' => '20', 'Code' => 'ABC 1'], 5 => ['Name' => 'John', 'Age' => '20', 'Code' => 'ABC 100'], 6 => ['Name' => 'John', 'Age' => '20', 'Code' => 'ABC 2'], ]; foreach ($array as ['Name' => $names[], 'Age' => $ages[], 'Code' => $codes[]]); array_multisort( $names, $ages, SORT_DESC, SORT_NUMERIC, $codes, SORT_ASC, SORT_NATURAL, $array ); var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'Name' => 'John', 'Age' => '21', 'Code' => 'ABC 1', ), 1 => array ( 'Name' => 'John', 'Age' => '20', 'Code' => 'ABC 1', ), 2 => array ( 'Name' => 'John', 'Age' => '20', 'Code' => 'ABC 2', ), 3 => array ( 'Name' => 'John', 'Age' => '20', 'Code' => 'ABC 12', ), 4 => array ( 'Name' => 'John', 'Age' => '20', 'Code' => 'ABC 100', ), 5 => array ( 'Name' => 'Mary', 'Age' => '20', 'Code' => 'ABC 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:
72.91 ms | 407 KiB | 5 Q