3v4l.org

run code in 300+ PHP versions simultaneously
<?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());

preferences:
151.73 ms | 404 KiB | 5 Q