Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BinaryUtils.php

function BinaryUtils::applyVariant

Applies the RFC 4122 variant field to the 16-bit clock sequence

@link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant

@psalm-pure

Parameters

int $clockSeq The 16-bit clock sequence value before the RFC 4122: variant is applied

Return value

int The 16-bit clock sequence multiplexed with the UUID variant

1 call to BinaryUtils::applyVariant()
UuidFactory::uuidFromBytesAndVersion in vendor/ramsey/uuid/src/UuidFactory.php
Returns an RFC 4122 variant Uuid, created from the provided bytes and version

File

vendor/ramsey/uuid/src/BinaryUtils.php, line 34

Class

BinaryUtils
Provides binary math utilities

Namespace

Ramsey\Uuid

Code

public static function applyVariant(int $clockSeq) : int {
    $clockSeq = $clockSeq & 0x3fff;
    $clockSeq |= 0x8000;
    return $clockSeq;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal