<?php class Foo { public function __construct() { var_dump('created!'); } } class Bar { public function getFoo() { static $foo; return $foo ?? ($foo = new Foo); } }
You have javascript disabled. You will not be able to edit any code.