function Fields::getVersion
Same name in this branch
- 11.1.x vendor/ramsey/uuid/src/Nonstandard/Fields.php \Ramsey\Uuid\Nonstandard\Fields::getVersion()
- 11.1.x vendor/ramsey/uuid/src/Guid/Fields.php \Ramsey\Uuid\Guid\Fields::getVersion()
Overrides VersionTrait::getVersion
1 call to Fields::getVersion()
- Fields::getTimestamp in vendor/
ramsey/ uuid/ src/ Rfc4122/ Fields.php - Returns the full 60-bit timestamp, without the version
File
-
vendor/
ramsey/ uuid/ src/ Rfc4122/ Fields.php, line 175
Class
- Fields
- RFC 4122 variant UUIDs are comprised of a set of named fields
Namespace
Ramsey\Uuid\Rfc4122Code
public function getVersion() : ?int {
if ($this->isNil() || $this->isMax()) {
return null;
}
/** @var int[] $parts */
$parts = unpack('n*', $this->bytes);
return $parts[4] >> 12;
}