3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __toString() { $exception = new Exception('foo'); trigger_error((string) $exception, E_USER_ERROR); } } $foo = new Foo; echo $foo;

preferences:
51.87 ms | 402 KiB | 5 Q