1. 首页
  2. 数据库
  3. 其它
  4. 领悟php接口中interface存在的意义

领悟php接口中interface存在的意义

上传者: 2020-12-23 02:51:35上传 PDF文件 36.84KB 热度 6次
可能大家都懂这些,作为不懂的我猜测了一下这个interface的意义,他就是为了后面调用的时候再调用的方法中调用实现类中interface中存在的内容,好绕口啊,写个例子留作以后看吧pay.php复制代码 代码如下:interface Ipay{ function withmoney(); //function withinternet();}class Dmeng implements Ipay{ function withmoney() { echo “花人民币买东西”; } function withinternet() { return “用网银支付”; }}usei.php复制代
下载地址
用户评论