fork(1) download
  1. <?php
  2.  
  3. class A { }
  4. class B extends A { }
  5.  
  6. interface I {
  7. public function f(B $x);
  8. }
  9.  
  10. class C implements I {
  11. public function f(A $x) { }
  12. }
  13.  
Runtime error #stdin #stdout #stderr 0.01s 20568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Declaration of C::f() must be compatible with I::f(B $x) in /home/qX7CcX/prog.php on line 10