Untitled
public php v1 · immutable<?php class Singleton { private static $instance; public static function getInstance() { if ((self::$instance instanceof Singleton) === FALSE) { self::$instance = new Singleton(); } return self::$instance; } private __construct() { // codice costruttore } } $Test = Test::getInstance();?>