3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function iksort($a, $b) { return strcasecmp(strtolower($a), strtolower($b)); } $testArray = array('PW_PG3_COKE_A.jpg','2DAYSALEGATE_PG2.jpg','PWBY4_DELI-1.jpg','PW_PG2_COKE_A.jpg','2DAYSALEGATE_PG1.jpg','722_PG1.jpg'); uksort($testArray, 'iksort'); print_r($testArray);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => PW_PG3_COKE_A.jpg [1] => 2DAYSALEGATE_PG2.jpg [2] => PWBY4_DELI-1.jpg [3] => PW_PG2_COKE_A.jpg [4] => 2DAYSALEGATE_PG1.jpg [5] => 722_PG1.jpg )