src/Server/Asyn/MQTT/Utility.php
static public function DecodeLength($msg, &$pos)
    {
        $multiplier = 1;
        $value = 0 ;
        do{
            $digit = ord($msg[$pos]);
            $value += ($digit & 0x7F) * $multiplier;
            $multiplier *= 0x80;
            $pos++;
        } while (($digit & 0x80) != 0);

        return $value;
    }
static public function DecodeLength($msg, &$pos)
    {
        $multiplier = 1;
        $value = 0 ;
        do{
            $digit = ord($msg[$pos]);
            $value += ($digit & 0x7F) * $multiplier;
            $multiplier *= 0x80;
            $pos++;
        } while (($digit & 0x80) != 0);

        return $value;
    }
static public function DecodeLength ( $ msg , & $ pos ) { $ multiplier = 1 ; $ value = 0 ; do { $ digit = ord ( $ msg [ $ pos ] ) ; $ value += ( $ digit & 0x7F ) * $ multiplier ; $ multiplier *= 0x80 ; $ pos ++ ; } while ( ( $ digit & 0x80 ) != 0 ) ; return $ value ; }
Decode Remaining Length

@param string $msg
@param int &  $pos
@return int
Decode Remaining Length