3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( array ('B.Osweiler',14.88 ), array ('D.Fales', 3.96), array ('B.Radcliff', 6.4 ), array ('K.Ballage', 13.7 ), array ('J.Langford', 2.8 ), array ('B.Howell', 16.8 ) ); print '<pre>'; print "Before Sort". PHP_EOL;; print_r($array); usort($array, function($a, $b) { return $b['1'] - $a['1']; }); print "After Sort". PHP_EOL; print_r($array); ?>
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Before Sort Array ( [0] => Array ( [0] => B.Osweiler [1] => 14.88 ) [1] => Array ( [0] => D.Fales [1] => 3.96 ) [2] => Array ( [0] => B.Radcliff [1] => 6.4 ) [3] => Array ( [0] => K.Ballage [1] => 13.7 ) [4] => Array ( [0] => J.Langford [1] => 2.8 ) [5] => Array ( [0] => B.Howell [1] => 16.8 ) ) After Sort Array ( [0] => Array ( [0] => B.Howell [1] => 16.8 ) [1] => Array ( [0] => B.Osweiler [1] => 14.88 ) [2] => Array ( [0] => K.Ballage [1] => 13.7 ) [3] => Array ( [0] => B.Radcliff [1] => 6.4 ) [4] => Array ( [0] => D.Fales [1] => 3.96 ) [5] => Array ( [0] => J.Langford [1] => 2.8 ) )

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:
17.71 ms | 403 KiB | 8 Q