Anonymous
public php v1 · immutable<?phpclass foo { public static function singleton() { if (!isset($_SESSION['Singleton'][__CLASS__])) { $c = __CLASS__; $_SESSION['Singleton'][__CLASS__] = new $c; } return $_SESSION['Singleton'][__CLASS__]; }}?>