3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static public function bar() { var_dump($this); } } try { $obj = new Foo; $obj->bar(); } catch (Throwable $e) { echo $e->getMessage() . "\n"; } try { call_user_func([new Foo, 'bar']); } catch (Throwable $e) { echo $e->getMessage() . "\n"; }

preferences:
102.06 ms | 1416 KiB | 5 Q