All pastes #70206 Raw Edit

impl

public php v1 · immutable
#70206 ·published 2006-06-23 22:01 UTC
rendered paste body
<?phpclass T {        private function __construct () {                echo "Private constructor\n";        }        public static function getInstance () {                static $instance;                if ($instance === null) {                        $instance = new T();                }                return $instance;        }}$t = T::getInstance();?>