<?php
interface Talkable
{
public function talk();
}
interface Meowable extends Talkable
{
public function meow();
}
class Cat implements Meowable
{
public function talk() {}
public function meow() {}
}
function test(Meowable $cat)
{
}
test(new Cat());
PD9waHAKCmludGVyZmFjZSBUYWxrYWJsZSAKewoJcHVibGljIGZ1bmN0aW9uIHRhbGsoKTsKfQoKaW50ZXJmYWNlIE1lb3dhYmxlIGV4dGVuZHMgVGFsa2FibGUgCnsKCXB1YmxpYyBmdW5jdGlvbiBtZW93KCk7Cn0KCmNsYXNzIENhdCBpbXBsZW1lbnRzIE1lb3dhYmxlIAp7CglwdWJsaWMgZnVuY3Rpb24gdGFsaygpIHt9CglwdWJsaWMgZnVuY3Rpb24gbWVvdygpIHt9Cn0KCmZ1bmN0aW9uIHRlc3QoTWVvd2FibGUgJGNhdCkKewoJCn0KCnRlc3QobmV3IENhdCgpKTsK