<?php
error_reporting(-1);
interface I
{
function foo();
static function bar();
}
class C implements I
{
public function foo() { echo "foo\n"; }
//public static function bar() { echo "bar\n"; }
public function test()
{
$this->foo();
//self::bar();
}
}
$c = new C();
$c->test();
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (I::bar) in /in/tj0QV on line 10
Process exited with code 255.
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (I::bar) in /in/tj0QV on line 19
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class C contains 1 abstract methods and must therefore be declared abstract (I::bar) in /in/tj0QV on line 19
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/tj0QV on line 4
Process exited with code 255.