<?php class A { public function test(Foo $foo) {} } class B extends A { public function test(Bar $foo) {} } ?>