<?php Class Bar { public static $name = "bar"; } Class Foo { public function getParent(){ $this->parentClass = new Bar(); return $this; } } $foo = (new Foo())->getParent(); echo get_class_vars(get_class($foo->parentClass))["name"];
You have javascript disabled. You will not be able to edit any code.