3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(1 => 1, 2 => 2, 3 => 3); foreach($test as $key => &$value) { } uasort($test, function($a, $b) { if($a > $b) return -1; else if($a > $b) return 1; else return 0; }); print_r($test); foreach($test as $key => $value) { } print_r($test);

preferences:
40.1 ms | 402 KiB | 5 Q