3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array("10", 2, 53, "2.5"); $b = $a; $c = $b; sort($a); sort($b, SORT_NUMERIC); sort($c, SORT_STRING); var_dump($a); var_dump($b); var_dump($c);
Output for 4.3.0 - 7.1.0
array(4) { [0]=> int(2) [1]=> string(3) "2.5" [2]=> string(2) "10" [3]=> int(53) } array(4) { [0]=> int(2) [1]=> string(3) "2.5" [2]=> string(2) "10" [3]=> int(53) } array(4) { [0]=> string(2) "10" [1]=> int(2) [2]=> string(3) "2.5" [3]=> int(53) }