Documentation

BinaryUtils
in package

Provides binary math utilities

Table of Contents

applyVariant()  : int
Applies the RFC 4122 variant field to the 16-bit clock sequence
applyVersion()  : int
Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field

Methods

applyVariant()

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

public static applyVariant(int $clockSeq) : int
Parameters
$clockSeq : int

The 16-bit clock sequence value before the RFC 4122 variant is applied

Tags
link

RFC 4122, § 4.1.1: Variant

psalm-pure
Return values
int

The 16-bit clock sequence multiplexed with the UUID variant

applyVersion()

Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field

public static applyVersion(int $timeHi, int $version) : int
Parameters
$timeHi : int

The value of the 16-bit time_hi_and_version field before the RFC 4122 version is applied

$version : int

The RFC 4122 version to apply to the time_hi field

Tags
link

RFC 4122, § 4.1.3: Version

psalm-pure
Return values
int

The 16-bit time_hi field of the timestamp multiplexed with the UUID version number

Search results