3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function bar() { return get_parent_class($this); } } class bar extends foo{} $baz = new foo(); var_dump($baz->bar());

preferences:
44.82 ms | 402 KiB | 5 Q