3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['foo-test' => [1], '-' => [2], 'bar-test' => [3]]; uksort($a, function($x, $y) use (&$a) { // global $a; if (!isset($a[$x])) { throw new Exception("$x"); } if (!isset($a[$y])) { throw new Exception("$y"); } return $x < $y; });

preferences:
52.65 ms | 402 KiB | 5 Q