Php interface use instance Function _ PHP Tutorial

Source: Internet
Author: User
Use the instance function of the php interface. Php interface use instance function interfaceRen1 {constXINGMING Zhang 3; functionshuohua1 (); functionshuohua2 () ;}{functionshuohua3 (); functionshuohua4 (php interface use instance function)

Interface Ren1
{Const XINGMING = "James ";
Function shuohua1 ();
Function shuohua2 ();}
Interface Ren2 extends Ren1
{Function shuohua3 ();
Function shuohua4 ();}
Interface Ren3
{Function shuohua5 ();}
Interface Ren4
{Function shuo=6 ();}
Class Ren5
{Function shuo00007 ()
{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-> shuo1_6 ();
$ R-> shuo1_7 ();
Example output:
Zhang San
1111
2222
3333
4444
5555
6666
7777


Required interface Ren1 {const XINGMING = Zhang San; function shuohua1 (); function shuohua2 ();} interface Ren2 extends Ren1 {function shuohua3 (); function shuohua4 (...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.