3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( 'roman', '.php', '_bnla', 'Juhu', 'Člutá', '_bla' ); var_dump(setlocale(LC_ALL, 'en_US')); sort($a, SORT_LOCALE_STRING); var_dump($a);
based on vK4ZD
Output for 4.4.0 - 4.4.9, 5.0.2 - 7.2.0
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.1
bool(false) Notice: Use of undefined constant SORT_LOCALE_STRING - assumed 'SORT_LOCALE_STRING' in /in/HXdrM on line 13 Warning: sort() expects parameter 2 to be long, string given in /in/HXdrM on line 13 array(6) { [0]=> string(5) "roman" [1]=> string(4) ".php" [2]=> string(5) "_bnla" [3]=> string(4) "Juhu" [4]=> string(7) "Člutá" [5]=> string(4) "_bla" }