3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function array_sort(&$a) { for($x=0;$x<count($a);++$x) { $min = $x; for($y=$x+1;$y<count($a);++$y) { if($a[$y] < $a[$min] ) { $temp = $a[$min]; $a[$min] = $a[$y]; $a[$y] = $temp; } } } } $a = array(51,14,1,21,'hj'); array_sort($a); print_r($a); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => hj [1] => 1 [2] => 14 [3] => 21 [4] => 51 )