- Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
- Fatal error: Declaration of Child::foo() must be compatible with Par::foo(Base $x) in /in/jsccd on line 12
Process exited with code 255.
<?php
abstract class Base {}
class Sub extends Base {}
abstract class Par {
abstract public function foo(Base $x);
}
class Child extends Par {
public function foo(Sub $x) {}
}