3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends Exception { protected $code = 100; protected $message = 'Hello'; protected int $line = 45; protected string $file = '/path/to/file.php'; } try { throw new Foo(); } catch (Foo $e) { var_dump($e); }

preferences:
26.73 ms | 404 KiB | 5 Q