3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($firstValue, $secondValue) { if ($firstValue > $secondValue) { return 1; } if ($firstValue < $secondValue) { return -1; } return 0; } $array = array('a', 'b', 'a', 'b', 'c'); usort($array, 'test'); echo print_r($array);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.18 ms | 2612 KiB | 10 Q