toString

Learn how to get the string representation of a UUID.

This method gets the canonical lowercase string representation of the UUID.

Signature

This method has the following signature:

public function toString(): string

This method returns the UUID as a lowercase canonical string.

Example

Here is a basic example of how to use this method:

<?phpuse Croct\Plug\Uuid;
$value = Uuid::random()->toString();