Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface Foo {}
- interface Bar extends Foo {}
- class Baz implements Foo {}
- abstract class A
- {
- abstract public function test(Foo $x);
- }
- class B extends A
- {
- public function test (Bar $x) {}
- }
- function foo(A $foo, Foo $foo) {
- $foo->test($foo); // What should this do?
- }
- $obj = new B();
- foo($obj, new Baz());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement