首页 >后端开发 >php教程 >php接口的使用实例函数_PHP教程

php接口的使用实例函数_PHP教程

WBOY
WBOY原创
2016-07-20 11:00:421073浏览

php接口的使用实例函数  

interface Ren1
{const XINGMING="张三";
 function shuohua1();
 function shuohua2();}
interface Ren2 extends Ren1
{function shuohua3();
 function shuohua4();}
interface Ren3
{function shuohua5();}
interface Ren4
{function shuohua6();}
class Ren5
{function shuohua7()
 {echo "7777
";}}
class Ren extends Ren5 implements Ren2,Ren3,Ren4
{function shuohua1()
{echo "1111
";}
 function shuohua2()
{echo "2222
";}
 function shuohua3()
{echo "3333
";}
 function shuohua4()
{echo "4444
";}
 function shuohua5()
{echo "5555
";}
 function shuohua6()
{echo "6666
";}}
$r=new Ren();
echo Ren::XINGMING."
";
$r->shuohua1();
$r->shuohua2();
$r->shuohua3();
$r->shuohua4();
$r->shuohua5();
$r->shuohua6();
$r->shuohua7();
例输出:
张三
1111
2222
3333
4444
5555
6666
7777


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/445500.htmlTechArticlephp接口的使用实例函数 interface Ren1 {const XINGMING=张三; function shuohua1(); function shuohua2();} interface Ren2 extends Ren1 {function shuohua3(); function shuohua4(...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn