3v4l.org

run code in 300+ PHP versions simultaneously
<?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"); echo $childclass->getName() . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
Loaded from the child class. Hello, Payton! Deprecated: Creation of dynamic property ChildClazz::$name is deprecated in /in/n1Wbo on line 17 Payton

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
56.36 ms | 401 KiB | 8 Q