src/Xdr/XdrEncoder.php
public static function unsignedBigInteger64(BigInteger $value)
    {
        $xdrBytes = '';
        $bigIntBytes = $value->toBytes(true);

        // Special case: MAX_UINT_64 will look like 00ffffffffffffffff and have an
        // extra preceeding byte we need to get rid of
        if (strlen($bigIntBytes) === 9 && substr($value->toHex(true), 0, 2) === '00') {
            $bigIntBytes = substr($bigIntBytes, 1);
        }

        $paddingChar = chr(0);

        $paddingBytes = 8 - strlen($bigIntBytes);
        while ($paddingBytes > 0) {
            $xdrBytes .= $paddingChar;
            $paddingBytes--;
        }

        $xdrBytes .= $bigIntBytes;

        return XdrEncoder::opaqueFixed($xdrBytes, 8);
    }
public static function unsignedBigInteger64(BigInteger $value)
    {
        $xdrBytes = '';
        $bigIntBytes = $value->toBytes(true);

        // Special case: MAX_UINT_64 will look like 00ffffffffffffffff and have an
        // extra preceeding byte we need to get rid of
        if (strlen($bigIntBytes) === 9 && substr($value->toHex(true), 0, 2) === '00') {
            $bigIntBytes = substr($bigIntBytes, 1);
        }

        $paddingChar = chr(0);

        $paddingBytes = 8 - strlen($bigIntBytes);
        while ($paddingBytes > 0) {
            $xdrBytes .= $paddingChar;
            $paddingBytes--;
        }

        $xdrBytes .= $bigIntBytes;

        return XdrEncoder::opaqueFixed($xdrBytes, 8);
    }
Converts $value to an unsigned 8-byte big endian uint64

@param BigInteger $value
@return string