3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.27, 5.4.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.

preferences:
182.39 ms | 1399 KiB | 53 Q