3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stdObject = new StdClass; set_error_handler(function (int $severity, string $message, string $filename, int $line) { echo "Error Handled"; }); array_diff([$stdObject], [$stdObject]);
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/H5e1E:7 Stack trace: #0 /in/H5e1E(7): array_diff(Array, Array) #1 {main} thrown in /in/H5e1E on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Error HandledError Handled

preferences:
163.68 ms | 402 KiB | 204 Q