return substr_replace($bytes,
$clockSeqHiAndReserved, 8, 2
);
} /**
* @throws InvalidUuidException
* @throws InvalidUuidLengthException
*/
public static function fromBytesToHex(string
$bytes): string
{ if (mb_strlen($bytes, '8bit'
) !== 16
) { throw new InvalidUuidLengthException(mb_strlen($bytes, '8bit'
),
bin2hex($bytes));
} $uuid =
bin2hex($bytes);
if (!self::
isValid($uuid)) { throw new InvalidUuidException($uuid);
} return $uuid;
} public static function fromBytesToHexList(array
$bytesList): array
{