public function getIns(){ if(!(self::$ins instanceof self)){ self::$ins = new self(); } return self::$ins; }
public static function getIns() { if (self::$ins == false) { self::$ins = new self(); } return self::$ins; }
public static function getIns() { if (self::$ins === null) { self::$ins = new self(); } $conf = conf::getIns(); self::$ins->host = $conf->host; self::$ins->user = $conf->user; self::$ins->passwd = $conf->pwd; self::$ins->db = $conf->db; self::$ins->port = $conf->port; self::$ins->connect(); self::$ins->select_db(); self::$ins->setChar(); return self::$ins; }