I use a combination of Tjeerd Visser's and porneL's answer.
class Something{ private static $foo; private static getFoo() { if ($foo === null) $foo = [[ complicated initializer ]] return $foo; } public static bar() { [[ do something with self::getFoo() ]] }}
But an even better solution is to do away with the static methods and use the Singleton pattern. Then you just do the complicated initialization in the constructor. Or make it a "service" and use DI to inject it into any class that needs it.