<?php $A = new class() { public $name; public function getName() : string { return $this->name; } }; $B = new $A('matti'); var_dump($B->name);
You have javascript disabled. You will not be able to edit any code.