3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array("10", 4, 53, "2"); $b = $a; $c = $b; sort($a); sort($b, SORT_NUMERIC); sort($b, 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(1) "2" [1]=> int(4) [2]=> string(2) "10" [3]=> int(53) } array(4) { [0]=> string(2) "10" [1]=> string(1) "2" [2]=> int(4) [3]=> int(53) } array(4) { [0]=> string(2) "10" [1]=> int(4) [2]=> int(53) [3]=> string(1) "2" }