3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = ["123", "45f", "89"]; $arr2 = ["45f", "123", "89"]; $arr3 = ["89", "45f", "123"]; $sarr1 = sort($arr1); $sarr2 = sort($arr2); $sarr3 = sort($arr3); var_dump($arr1); var_dump($arr2); var_dump($arr3);
based on On7cf
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.10
array(3) { [0]=> string(3) "123" [1]=> string(3) "45f" [2]=> string(2) "89" } array(3) { [0]=> string(2) "89" [1]=> string(3) "123" [2]=> string(3) "45f" } array(3) { [0]=> string(3) "123" [1]=> string(3) "45f" [2]=> string(2) "89" }
Output for hhvm-3.18.5 - 3.22.0
array(3) { [0]=> string(3) "123" [1]=> string(3) "45f" [2]=> string(2) "89" } array(3) { [0]=> string(3) "123" [1]=> string(3) "45f" [2]=> string(2) "89" } array(3) { [0]=> string(3) "45f" [1]=> string(2) "89" [2]=> string(3) "123" }