3v4l.org

run code in 300+ PHP versions simultaneously
<?php $people = array( array("name"=>"Bob","age"=>8,"colour"=>"red"), array("name"=>"Greg","age"=>12,"colour"=>"blue"), array("name"=>"Andy","age"=>5,"colour"=>"purple") ); $arrSortArray = array(); foreach($people as $person) { foreach($person as $key=>$value){ if(!isset($arrSortArray[$key])){ $arrSortArray[$key] = array(); } $arrSortArray[$key][] = $value; } } $orderby = "name"; //change this to whatever key you want from the array var_dump(array_multisort($arrSortArray[$orderby],SORT_DESC,$people));
Output for git.master, git.master_jit, rfc.property-hooks
bool(true)

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:
38.17 ms | 401 KiB | 8 Q