3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array("10", 20, 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> string(3) "2.5" [1]=> string(2) "10" [2]=> int(20) [3]=> int(53) } array(4) { [0]=> string(3) "2.5" [1]=> string(2) "10" [2]=> int(20) [3]=> int(53) } array(4) { [0]=> string(2) "10" [1]=> string(3) "2.5" [2]=> int(20) [3]=> int(53) }