长短steamId互转

    /**
     * steam_id转换account_id
     * @param $steamId
     * @return mixed
     */
    public static function formatAccountIdBySteamId($steamId){

        return bcsub((string)$steamId, '76561197960265728');
    }

    /**
     * account_id转换steam_id
     * @param $accountId
     * @return mixed
     */
    public static function formatSteamIdByAccountId($accountId){

        return bcadd((string)$accountId, '76561197960265728');
    }

  

posted on 2019-04-29 14:22  diguaer  阅读(885)  评论(0编辑  收藏  举报

导航