- var_dump: documentation ( source)
<?php
class Foo
{
public static $bar = 'foo';
}
class Qux
{
public $foo;
public function render(): string
{
$this->foo = Foo::class;
return $this->foo::$bar;
}
}
$qux = new Qux;
var_dump($qux->render());