<?php class Foo { public function test(self $obj) { } public function testStatic(static $obj) { } } class bar extends Foo{} $foo = new foo(); $bar = new Bar(); $foo->test($foo); $foo->test($bar); $bar->testStatic($bar); $bar->testStatic($foo);
You have javascript disabled. You will not be able to edit any code.