3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => [23, 890], 1 => [56, 401], 2 => [56, 491], 3 => [98, 840], 4 => [56, 821], 5 => [98, 401], 6 => [23, 875], ]; uasort($arr, function ($a, $b) { if( $a[0] != $b[0] ) return $a[0] - $b[0]; else if( strval($a[1])[1] == 9 ) return 1; else return $a[1] - $b[1]; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [6] => Array ( [0] => 23 [1] => 875 ) [0] => Array ( [0] => 23 [1] => 890 ) [1] => Array ( [0] => 56 [1] => 401 ) [4] => Array ( [0] => 56 [1] => 821 ) [2] => Array ( [0] => 56 [1] => 491 ) [5] => Array ( [0] => 98 [1] => 401 ) [3] => Array ( [0] => 98 [1] => 840 ) )

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:
57.17 ms | 402 KiB | 8 Q