3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Interfaze { public function hello($name); public function getName(); } class ParentClazz implements Interfaze { public function __construct($name) { $this->hello($name); } public function hello($name) { echo "Hello, $name!\n"; } } class ChildClazz extends ParentClazz { public function __construct($name) { echo "Loaded from the child class.\n"; parent::__construct($name); } } $childclass = new ChildClazz("Payton");
based on PhTFG
Output for 7.0.0 - 7.2.0
Fatal error: Class ParentClazz contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Interfaze::getName) in /in/J3vJb on line 9
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Class ParentClazz contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Interfaze::getName) in /in/J3vJb on line 18
Process exited with code 255.