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\UuidCode
public static function applyVariant(int $clockSeq) : int {
$clockSeq = $clockSeq & 0x3fff;
$clockSeq |= 0x8000;
return $clockSeq;
}