3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test(Baz $bar1 = null) { var_dump(func_get_args()); } } class Baz extends Foo { public function test(...$args) { parent::test(...$args); } } $baz = new Baz(); $baz->test($baz); $foo = new Foo(); $foo->test($baz);

preferences:
90.89 ms | 402 KiB | 5 Q