PHP中的接口

<?php

 

  interface demoInterface{

 

  public function doIt();//声明方法

 

  }

 

  class hello implements demoInterface{

 

  public function doIt(){

 

  echo "实现接口中的方法";

 

  }

 

  }

 

  $demo=new hello();

 

  $demo->doIt();

 

  ?>

原文地址:https://www.cnblogs.com/lhy_2011/p/2080905.html