Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 24, 2024 via composer

ramsey/uuid 4.7.5

A PHP library for generating and working with universally unique identifiers (UUIDs).
Package summary
Share
0
issues
1
license
3
MIT
Package created
25 Apr 2015
Version published
8 Nov 2023
Maintainers
1
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
brick/math@0.11.0
ramsey/collection@2.0.0
ramsey/uuid@4.7.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
โ“˜ This is a list of ramsey/uuid 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
brick/math0.11.036.4 kBMIT
prod
ramsey/collection2.0.042.11 kBMIT
prod

Visualizations

Frequently Asked Questions

What does ramsey/uuid do?

The ramsey/uuid is an effective PHP library dedicated solely to the generation and manipulation of universally unique identifiers (UUIDs). This PHP-supported module applies across many web development scenarios where unique identifiers are of essence, aiding in creating a distinctive signature for objects, users, processes, transactions, and more. Drawing inspiration from the UUID libraries of Python and Java, ramsey/uuid integrates seamlessly into PHP development projects, elevating their functionality to a whole new level.

How do you use ramsey/uuid?

To use the ramsey/uuid package in your PHP project, it's vital to first install it via Composer, a widely-used PHP package manager. Open the command line in your project's root directory, then execute the command composer require ramsey/uuid. This command installs the ramsey/uuid package and registers it as a requirement in your project's composer.json file.

Here's a basic example of how you can use ramsey/uuid in your PHP code:

<?php

require 'vendor/autoload.php'; //Path to autoload file may vary depending on your project structure

use Ramsey\Uuid\Uuid;

$uuid1 = Uuid::uuid1();
echo $uuid1->toString(); // Prints: e.g. "fa53a55b-4b21-11e9-8647-d663bd873d93"

$uuid4 = Uuid::uuid4();
echo $uuid4->toString(); // Prints: e.g. "941961b8-df1f-4e8e-9c10-7b9063a7475f"

In the code above, we generate two UUIDs: a version 1 and version 4 UUID. Each Uuid::uuid*() call returns a new instance of Ramsey\Uuid\UuidInterface, from which you can retrieve the string representation using toString().

Where are the ramsey/uuid docs?

Documentation for the ramsey/uuid package is readily accessible at https://uuid.ramsey.dev. Here you will find elaborate guides, usage examples, and answers to frequently asked questions. The documentation offers in-depth insights into the installation and upgrading processes, understanding the API, usage scenarios, and more. Itโ€™s an essential resource for developers intending to leverage the power of UUIDs in their PHP applications using the ramsey/uuid package.