Download the PHP package highperapp/uuid without Composer

On this page you can find all versions of the php package highperapp/uuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uuid

UUID Library

A high-performance UUID generator library implementing RFC 9562 with support for UUIDv1-v8, featuring optional Rust FFI acceleration, async/sync compatibility, and high-concurrency collision prevention.

Features

Installation

Optional: Rust FFI Acceleration

For maximum performance, you can enable Rust FFI acceleration which can improve UUID generation speed by up to 10x.

Prerequisites

  1. Install PHP FFI Extension (required for Rust acceleration):

  2. Verify FFI Installation:

  3. Install Rust (if not already installed):

  4. Verify Installation:

Build the Rust Library

The compiled library will be available at rust/target/release/libuuid_ffi.so (Linux/macOS) or rust/target/release/uuid_ffi.dll (Windows).

Troubleshooting FFI Issues

If you encounter FFI-related errors:

  1. FFI Not Available:

  2. FFI Preloading Issues:

  3. Permission Issues:

  4. Library Path Issues:

Development vs Production

Quick Start

UUID Versions

UUIDv1 - Timestamp + MAC Address

UUIDv3 - MD5 Name-based

UUIDv4 - Random

UUIDv5 - SHA-1 Name-based

UUIDv6 - Reordered Timestamp

UUIDv7 - Unix Timestamp (Recommended)

UUIDv8 - Custom Format

Performance Configuration

High Performance Setup

Custom Configuration

Thread-Safe Operations

For concurrent environments (Swoole, ReactPHP, etc.), use the thread-safe factory:

Async/Concurrent Generation

Prerequisites for Async Features

Install optional async dependencies for enhanced capabilities:

Async Generation

High-Throughput Scenarios

Pipeline Processing

Async Configuration

Random Number Providers

Collision Prevention

The library includes advanced collision prevention mechanisms:

Benchmarking

Run performance tests to validate performance on your system:

Expected Performance Ranges

Performance depends on:

Integration Examples

Laravel

Symfony

Swoole/OpenSwoole Integration

ReactPHP Integration

Database Storage

Performance Characteristics

Version Performance Use Case Sortable Collision Risk
v1 High Legacy systems No Very Low
v3 Medium Name-based, reproducible No None
v4 High General purpose No Negligible
v5 Medium Name-based, reproducible No None
v6 High Sortable timestamp Yes Very Low
v7 Highest Recommended for new apps Yes Very Low
v8 Variable Custom implementations Variable Variable

Throughput Benchmarks

Benchmarks measured on PHP 8.3.6, Linux x86_64. Performance may vary based on hardware and configuration.

Configuration UUIDs/second Memory/UUID Notes
Pure PHP v4 ~600,000-900,000 <100 bytes Actual performance exceeds estimates
Pure PHP v7 ~700,000-900,000 <100 bytes Recommended for new applications
Pure PHP v1 ~600,000 <100 bytes Legacy timestamp-based
Pure PHP v3/v5 ~850,000-900,000 <100 bytes Name-based UUIDs (cached)
Rust FFI v4 ~1,000,000+ <50 bytes Requires FFI extension + Rust build
Rust FFI v7 ~1,200,000+ <50 bytes Optimal for high-throughput scenarios
Concurrent v4 ~400,000-800,000 Variable Depends on worker count and overhead

Memory Usage Notes:

Configuration Options

Error Handling

Development Setup

Prerequisites

  1. PHP 8.3+ with extensions:

  2. Composer (for PHP dependencies):

  3. Rust (optional, for FFI acceleration):

Development Workflow

Testing

Requirements

Core Requirements

Optional Dependencies

Note: The library works perfectly without optional dependencies, providing graceful fallbacks.

FFI Configuration

For production environments, consider adding these settings to your php.ini:

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

License

MIT License. See LICENSE for details.


All versions of uuid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package highperapp/uuid contains the following files

Loading the files please wait ....