承接 uuidfactory/uuidfactory-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

uuidfactory/uuidfactory-php

最新稳定版本:1.0.0

Composer 安装命令:

composer require uuidfactory/uuidfactory-php

包简介

PHP client for UUIDFactory API – generate and validate UUIDs online

README 文档

README

PHP client for UUIDFactory API – generate and validate UUIDs online

UUIDFactory website | API Documentation | Online Validator | Online Generator

Overview

uuidfactory-php is the official PHP client for the UUIDFactory API.
Easily generate and validate UUIDs in your PHP projects. Supports UUID versions v1, v4, v7, GUID, batch generation, and batch validation, with seamless integration with the UUIDFactory online tools.

Key Features:

  • Generate UUID v1, v4, v7, and GUID programmatically
  • Validate single UUIDs or multiple UUIDs at once
  • Generate multiple UUIDs at once (batch generation)
  • Simple, lightweight PHP client using cURL
  • Works with UUIDFactory API

Requirements

  • PHP 7.4+
  • ext-curl
  • ext-json

Installation

Install via Composer:

composer require uuidfactory/uuidfactory-php

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

use UuidFactory\UuidFactoryClient;

$client = new UuidFactoryClient();

// Generate a UUID v4
$uuid = $client->generateV4();
echo "Generated UUID v4: " . $uuid . "\n";

// Generate multiple UUIDs
$uuids = $client->generateMultiple('v4', 5);
print_r($uuids);

// Validate a single UUID
$result = $client->validate($uuids[0]);
echo "Is single UUID valid? " . ($result['status'] === 'valid' ? 'yes' : 'no') . "\n";

// Validate multiple UUIDs at once
$validationResults = $client->validateMultiple($uuids);
print_r($validationResults);

Available Methods

Method Description
generateV1() Generate UUID version 1
generateV4() Generate UUID version 4 (random)
generateV7() Generate UUID version 7
generateGUID() Generate a GUID
generateMultiple(string $type, int $count) Generate multiple UUIDs of the given type (v1, v4, v7, guid)
validate(string $uuid) Validate if a string is a valid UUID; returns `['uuid' => ..., 'status' => 'valid'
validateMultiple(array $uuids) Validate multiple UUIDs at once

Examples

Check the examples/ folder for ready-to-run PHP scripts:

  • examples/basic.php – Generate and validate single UUIDs
  • examples/batch.php – Generate and validate multiple UUIDs at once

Run from project root after composer install:

php examples/basic.php
php examples/batch.php

Uruchomienie w Dockerze

W katalogu projektu:

docker compose run --rm php composer install
docker compose run --rm php php examples/basic.php
docker compose run --rm php php examples/batch.php

Use Cases

  • Quick UUID generation for PHP backend projects
  • Validating single or multiple UUIDs before database insertion
  • Generating multiple UUIDs for bulk operations
  • Integration in Laravel, Symfony, or plain PHP apps

Links & References

License

This project is licensed under the MIT License.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固