阅读背景:

使用不兼容的函数实现接口和错误。

来源:互联网 

I have this test script:

我有这个测试脚本:

<?php
interface A
{
  function myfunction();
}

class B implements A
{
  function myfunction($var = "default")
  {
    echo $var;
  }
}

class C extends B
{
  function myfunction()
  {
    echo "myfunction";
  }
}

$c = new C();
$c->myfunction();

$b = new B();
$b->myfunction();
<?php
in



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: