3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = array(5,1,9,7,4); function cmp($a, $b) { return strcmp($a, $b); } usort($result, 'cmp'); echo '<pre>'; print_r($result); echo '</pre>';
Output for 4.3.0 - 7.1.0
<pre>Array ( [0] => 1 [1] => 4 [2] => 5 [3] => 7 [4] => 9 ) </pre>