Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. functions.php

function v8

Returns a version 8 (custom) UUID

The bytes provided may contain any value according to your application's needs. Be aware, however, that other applications may not understand the semantics of the value.

Parameters

string $bytes A 16-byte octet string. This is an open blob: of data that you may fill with 128 bits of information. Be aware, however, bits 48 through 51 will be replaced with the UUID version field, and bits 64 and 65 will be replaced with the UUID variant. You MUST NOT rely on these bits for your application needs.

Return value

non-empty-string Version 8 UUID as a string

File

vendor/ramsey/uuid/src/functions.php, line 155

Namespace

Ramsey\Uuid

Code

function v8(string $bytes) : string {
    return Uuid::uuid8($bytes)->toString();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal