3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Bar { public function augment() { } } abstract class Baz implements Bar { public function __construct($data) { $this->data = $data; $this->augment(); } } class Foo extends Baz { public function augment() { $this->data = strtoupper($this->data); } } $foo = new Foo('imlower');
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.24
Fatal error: Interface function Bar::augment() cannot contain body in /in/cC42E on line 6
Process exited with code 255.

preferences:
171.72 ms | 1395 KiB | 61 Q