interface a{
function ta(){}
}
class b extends a{
function ta(){
echo 'class b';
}
}
class c{
var a;
function c($a){
$this->a=$a;
}
function test(){
echo 'test start';
echo 'test start';
$this->a->ta();
}
}
$ta=new b();
$tb= new c($ta);
$tb->test();
?>
php 接口使用示例