3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); asort($fruits, SORT_STRING | SORT_FLAG_CASE); foreach ($fruits as $key => $val) { echo "1: $key = $val\n"; } echo "==="; $fruits2 = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); natcasesort($fruits2); foreach ($fruits2 as $key => $val) { echo "2: $key = $val\n"; } ?>
Output for 4.3.0 - 7.1.0
1: c = apple 1: b = banana 1: d = lemon 1: a = orange ===2: c = apple 2: b = banana 2: d = lemon 2: a = orange