/** * If we had previously connected to the MySQL database, this function will * disconnect from the MySQL server and close the socket. */ public static function disconnect() { if (!self::$_mysql || !self::$_mysql instanceof mysqli) { return; } self::$_mysql->close(); self::$_mysql = false; }