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"; $this->name = $name; } public function getName() { return $this->name; } } class ChildClazz extends ParentClazz { public function __construct($name) { echo "Loaded from the child class.\n"; parent::__construct($name); } } $childclass = new ChildClazz("Payton");
based on J3vJb
Output for 5.3.19 - 7.3.0beta1
Loaded from the child class. Hello, Payton!