3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function (int $errorNo, string $message, string $file, int $line): bool { if ($errorNo == E_DEPRECATED) { throw new ErrorException($message, 0, $errorNo, $file, $line); } return TRUE; }); class Test { function try() { $this->property = 'hello'; } } $test = new Test(); $test->try();

preferences:
12.95 ms | 404 KiB | 5 Q