3v4l.org

run code in 300+ PHP versions simultaneously
<?php // New syntax since PHP 7.4 $a = [3, 2, 5, 6, 1]; usort($a, fn($a, $b) => $a<=>$b); foreach ($a as $key => $value) { echo "$key: $value\n"; }

preferences:
23.67 ms | 404 KiB | 5 Q