3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php abstract class Abst { public function compare(self $object); } interface I { public function compare(self $object); } class A extends Abst { public function compare(self $aObject) { return true; } } class B implements I { public function compare(self $bObject) { return true; } } class C extends A { public function compare(self $bObject) { return true; } } $a = new A(); $b = new B(); $c = new C(); $a->compare($a); $a->compare($b); $a->compare($c);
Output for 5.3.0 - 5.4.17
Fatal error: Non-abstract method Abst::compare() must contain body in /in/BXKIj on line 3
Process exited with code 255.