public static function calculatePayloadOffset($negotiate_flags)
    {
        $offset = 0;

        $offset += strlen(static::SIGNATURE); // 8-byte signature
        $offset += 4; // Message-type indicator
        $offset += 4; // 32-bit Negotation flags

        $offset += 8; // 64-bit domain name field designator
        $offset += 8; // 64-bit client hostname field designator

        return $offset;
    }
public static function calculatePayloadOffset($negotiate_flags)
    {
        $offset = 0;

        $offset += strlen(static::SIGNATURE); // 8-byte signature
        $offset += 4; // Message-type indicator
        $offset += 4; // 32-bit Negotation flags

        $offset += 8; // 64-bit domain name field designator
        $offset += 8; // 64-bit client hostname field designator

        return $offset;
    }
public static function calculatePayloadOffset ( $ negotiate_flags ) { $ offset = 0 ; $ offset += strlen ( static :: SIGNATURE ) ; // 8-byte signature $ offset += 4 ; // Message-type indicator $ offset += 4 ; // 32-bit Negotation flags $ offset += 8 ; // 64-bit domain name field designator $ offset += 8 ; // 64-bit client hostname field designator return $ offset ; }
Calculates the offset of the "Payload" in the encoded message from the
most-significant bit.

@param int $negotiate_flags The negotiation flags encoded in the message.
@return int The offset, in bytes.
Calculates the offset of the Payload in the encoded message from the most - significant bit .