Skip to content
Mo McRoberts edited this page Aug 7, 2011 · 1 revision

Parse a string containing a UUID and return an array representing its value.

Synopsis

uses('uuid');

public static function array [[UUID]]::parse(string [in] $uuid)

Description

UUID::parse() converts a string representation of a UUID to an array. The array contains the following members:

  • time_low
  • time_mid
  • time_hi_and_version
  • clock_seq_hi_and_reserved
  • clock_seq_low
  • node
  • version
  • variant The version member contains a UUID version number, for example UUID::RANDOM. The variant member specifies the UUID variant, for example UUID::DCE.

Example

Parameters

Name Direction Type Description
$uuid in string A string representation of a UUID.

Return Value

An array representing the supplied UUID, or null if an error occurs.

Clone this wiki locally