SkillAgentSearch skills...

Uuid

Function for generating a UUID (as string)

Install / Use

/learn @sebastianbergmann/Uuid
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Latest Stable Version CI Status codecov

sebastian/uuid

This package provides a single function: uuid(). This function uses PHP's random_bytes() function to generate a string that contains a 16-byte number written in hexadecimal and divided into five groups of characters (8-4-4-4-12).

Strings generated using the uuid() function can be used as Universally Unique Identifiers (UUIDs) in certain contexts.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require sebastian/uuid

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev sebastian/uuid

Usage

<?php declare(strict_types=1);
use function SebastianBergmann\Uuid\uuid;

var_dump(uuid());
string(36) "67b14e2a-17a4-43f7-aba5-859f7fc07b69"
View on GitHub
GitHub Stars27
CategoryDevelopment
Updated3mo ago
Forks0

Languages

PHP

Security Score

92/100

Audited on Dec 31, 2025

No findings