webCOMAND

uuid::v1()

Generate and return a Version 1 UUID, which is based on the time and network adapter MAC address when available.

This method will use the underlying database when available, for low-level access to hardware MAC address.  Otherwise it will fallback to v4().

Prototype

string v1(PDO $pdo)

Parameters

  • pdo - PHP database object (PDO).

Example

$pdo = new PDO('mysql:host=localhost;dbname=db', $username, $password);
$new_uuid = \io_comand_util\uuid::v1($pdo);