3v4l.org

run code in 300+ PHP versions simultaneously
<?php usort([1, 4, 5, 3, 2], function($a, $b) { return $a > $b ; });
Output for 8.0.0 - 8.0.3
Fatal error: Uncaught Error: usort(): Argument #1 ($array) cannot be passed by reference in /in/5f91H:3 Stack trace: #0 {main} thrown in /in/5f91H on line 3
Process exited with code 255.
Output for 7.3.0 - 7.3.27, 7.4.0 - 7.4.16
Fatal error: Only variables can be passed by reference in /in/5f91H on line 3
Process exited with code 255.