Home  >  Article  >  Backend Development  >  How to implement interface in php

How to implement interface in php

coldplay.xixi
coldplay.xixiOriginal
2020-08-13 15:17:414089browse

php method to implement the interface: first create a file with the suffix php and the name interface, and add the php tag to the file; then create two interface classes Jk1 and Jk2 in the page; finally, in the two Add methods jiekou1 and jiekou2 to the interface class, and take one parameter each.

How to implement interface in php

php method to implement the interface:

1. Create a file with the suffix php and the name interface and put it in Add the php tag

How to implement interface in php

#2 to the file and create two interface classes Jk1 and Jk2 in the page.

How to implement interface in php

3 , add methods jiekou1 and jiekou2 to the two interface classes respectively with one parameter respectively

How to implement interface in php

Related learning recommendations: php programming (video)

The above is the detailed content of How to implement interface in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn