3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 1 => "one", "two" => "two", 3.01 => "three", "4" => "four", false => "five", ]; krsort($arr, SORT_STRING); var_dump($arr);

preferences:
34.26 ms | 405 KiB | 5 Q