function Uuid::uuid8
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
UuidInterface A UuidInterface instance that represents a version 8 UUID
File
-
vendor/
ramsey/ uuid/ src/ Uuid.php, line 745
Class
- Uuid
- Uuid provides constants and static methods for working with and generating UUIDs
Namespace
Ramsey\UuidCode
public static function uuid8(string $bytes) : UuidInterface {
$factory = self::getFactory();
if (method_exists($factory, 'uuid8')) {
/** @var UuidInterface */
return $factory->uuid8($bytes);
}
throw new UnsupportedOperationException('The provided factory does not support the uuid8() method');
}