<?php

 

  interface demoInterface{

 

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

 

  }

 

  class hello implements demoInterface{

 

  public function doIt(){

 

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

 

  }

 

  }

 

  $demo=new hello();

 

  $demo->doIt();

 

  ?>

 posted on 2011-06-14 19:30  编程小兵  阅读(180)  评论(0编辑  收藏  举报