<?php
interface Interfaze {
public function hello($name);
}
class Clazz implements Interfaze {
public function __construct() {
$this->hello();
}
public function hello($name) {
echo "Hello, $name!";
}
}
class ClazzChild extends Clazz {
public function __construct() {
echo "Loaded from the child class.";
parent::__construct();
}
}
$childclass = new ChildClazz;
$childclass;
Fatal error: Uncaught Error: Class "ChildClazz" not found in /in/C8Anj:27
Stack trace:
#0 {main}
thrown in /in/C8Anj on line 27
Process exited with code 255.
Fatal error: Uncaught Error: Class 'ChildClazz' not found in /in/C8Anj:27
Stack trace:
#0 {main}
thrown in /in/C8Anj on line 27
Process exited with code 255.
Output for 5.6.5 - 5.6.6, 7.0.4 - 7.0.5, 7.2.4, 7.2.7