<?php
interface Interfaze {
public function hello($name);
}
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");