3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Hand = array("05h", "02h", "03c", "02s", "04h"); $Hand2 = array("05h", "02h", "03c", "02s", "03h"); $Hand3 = array("03s", "02h", "03c", "02s", "03h"); function sortMyArray(&$arr){ usort($arr, function($a,$b) { if(intval($a) == intval($b)){ return 0; } return 1; }); return $arr; } print_R(sortMyArray($Hand)); print_R(sortMyArray($Hand2)); print_R(sortMyArray($Hand3));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 04h [1] => 02h [2] => 02s [3] => 03c [4] => 05h ) Array ( [0] => 02h [1] => 02s [2] => 03c [3] => 03h [4] => 05h ) Array ( [0] => 02h [1] => 02s [2] => 03s [3] => 03c [4] => 03h )

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