3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; public static function make() { $foo = new static; $foo->bar = 'Hello World!'; return $foo; } public function getBar() { return $this->bar; } } var_dump(Foo::make());

preferences:
47.54 ms | 402 KiB | 5 Q