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

Breadcrumb

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

function v7

Returns a version 7 (Unix Epoch time) UUID

Parameters

DateTimeInterface|null $dateTime An optional date/time from which: to create the version 7 UUID. If not provided, the UUID is generated using the current date/time.

Return value

non-empty-string Version 7 UUID as a string

File

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

Namespace

Ramsey\Uuid

Code

function v7(?DateTimeInterface $dateTime = null) : string {
    return Uuid::uuid7($dateTime)->toString();
}

API Navigation

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