3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array("D"=>"dog","a"=>"cat","A"=>"moose","d"=>"mouse"); ksort($arr, 'SORT_FLAG_CASE'); var_dump($arr);
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: ksort() expects parameter 2 to be integer, string given in /in/VqRD1 on line 6 array(4) { ["D"]=> string(3) "dog" ["a"]=> string(3) "cat" ["A"]=> string(5) "moose" ["d"]=> string(5) "mouse" }
Output for 4.3.0 - 5.6.28
Warning: ksort() expects parameter 2 to be long, string given in /in/VqRD1 on line 6 array(4) { ["D"]=> string(3) "dog" ["a"]=> string(3) "cat" ["A"]=> string(5) "moose" ["d"]=> string(5) "mouse" }