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(Baz ...$args) { parent::test(...$args); } } $baz = new Baz(); $baz->test($baz); $foo = new Foo($baz); $foo->test();

preferences:
45.27 ms | 402 KiB | 5 Q