<?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");
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.
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.