This article mainly introduces the implementation of multiple php interfaces. The example analyzes the definitions and usage skills of multiple php interfaces, for more information about how to implement multiple php interfaces, see the example in this article. Share it with you for your reference. The details are as follows:
<? Php interface staff_i1 // interface 1 {function setID ($ id); function getID ();} interface staff_i2 // interface 2 {function setName ($ name ); function getName ();} class staff implements staff_i1, staff_i2 // interface implementation {private $ id; private $ name; function setID ($ id) {$ this-> id = $ id;} function getID () {return $ this-> id;} function setName ($ name) {$ this-> name = $ name;} function getName () {return $ this-> name;} fun Ction otherFunc () {echo "Test" ;}}?>
I hope this article will help you with php programming.