interface a {
//接口内不可以定义属性
//所有方法必须为抽象方法(既不实现,只定义)
public function method1($param);
protected function method2($param);
}
//接口不可被实现,例如
$instance = new a; //错误
//接口实现类必须实现接口的所有方法,且方法参数也必须相同
//例如
class b implaments a{
//错误,封装应与接口相同
protected function method1($param)
{
//somecode here...
}
//错误,参数应与接口定义相同
protected function method2()
{