3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpinfo(); class Father { public $value; /** * Father Controller */ public function __construct() { $this->value = 123; } } class Child extends Father { /** * Child Controller that extend Father */ public function __construct($x) { parent::__construct(); } } $obj = new Child(1); echo $obj->value;

preferences:
36.16 ms | 402 KiB | 5 Q