3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = array(0,1,2,3,4,40,50,66,72,'f','0','g',4,35,5,654,654,2,2345,456,'asdf'); $bar = array(0,1,2,3,4,40,50,66,72,'f','0','g',4,35,5,654,654,2,2345,456,'asdf'); ksort($foo); ksort($bar, SORT_LOCALE_STRING); var_dump($foo == $bar);
based on MK0i7
Output for 4.4.0 - 4.4.9, 5.0.2 - 7.1.0
bool(true)
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.1
Notice: Use of undefined constant SORT_LOCALE_STRING - assumed 'SORT_LOCALE_STRING' in /in/W8qnQ on line 5 Warning: ksort() expects parameter 2 to be long, string given in /in/W8qnQ on line 5 bool(true)