function Fields::getTimeLow
Same name in this branch
- 11.1.x vendor/ramsey/uuid/src/Nonstandard/Fields.php \Ramsey\Uuid\Nonstandard\Fields::getTimeLow()
- 11.1.x vendor/ramsey/uuid/src/Rfc4122/Fields.php \Ramsey\Uuid\Rfc4122\Fields::getTimeLow()
Overrides FieldsInterface::getTimeLow
File
-
vendor/
ramsey/ uuid/ src/ Guid/ Fields.php, line 89
Class
- Fields
- GUIDs are comprised of a set of named fields, according to RFC 4122
Namespace
Ramsey\Uuid\GuidCode
public function getTimeLow() : Hexadecimal {
// Swap the bytes from little endian to network byte order.
/** @var array $hex */
$hex = unpack('H*', pack('v*', hexdec(bin2hex(substr($this->bytes, 2, 2))), hexdec(bin2hex(substr($this->bytes, 0, 2)))));
return new Hexadecimal((string) ($hex[1] ?? ''));
}