3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( [ "unix" => 1556547761, // notice the two duplicate unix values "random" => 4 ], [ "unix" => 1556547761, "random" => 2 ], [ "unix" => 1556547769, "random" => 5 ], [ "unix" => 1556547765, // this should be in the 3rd position "random" => 9 ] ); function cmpByUnix($a, $b) { return $a["unix"] - $b["unix"]; } usort($array, "cmpByUnix"); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [unix] => 1556547761 [random] => 4 ) [1] => Array ( [unix] => 1556547761 [random] => 2 ) [2] => Array ( [unix] => 1556547765 [random] => 9 ) [3] => Array ( [unix] => 1556547769 [random] => 5 ) )

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