<?php
interface usb{
public function star();
public function stop();
}
interface sb{
public function action();
}
//接口的继承
interface all extends usb,sb{
}
class parente{
public function test(){}
}
//类的继承以及接口实现
class phone extends parente implements all{
public function star(){
echo "phone began to work<br>";
}
public function stop(){
echo "phone stop to work<br>";
}
public function action(){
echo "much interface<br>";
}
public function test(){
echo "come form parents<br>";
}
}
$huawei = new phone();
$huawei->star();
$huawei->stop();
$huawei->action();
$huawei->test();
?>