quasilyte/kphp-uuid

为 KPHP 提供的简单 UUID 生成包

dev-master 2021-08-24 09:59 UTC

This package is not auto-updated.

Last update: 2024-09-18 01:11:18 UTC


README

Build Status

KPHP UUID 示例库

警告:这不是一个真正的 UUID 库。它只是我为 KPHP 测试/基准测试文章的一个示例项目。

通过 composer 安装(发布于 packagist.org/packages/quasilyte/kphp-uuid

$ composer require quasilyte/kphp-uuid:dev-master

使用方法

<?php

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

use Quasilyte\KPHP\Uuid\UUID;

var_dump(UUID::v4());

运行测试和基准测试

# Running tests in PHP mode (PHPUnit)
$ phpunit --bootstrap ./vendor/autoload.php tests

# Run tests in KPHP mode (KPHPUnit)
$ ktest phpunit tests

# Run KPHP benchmarks
$ ktest bench ./benchmarks/UUIDBenchmark.php

此存储库包含一个方便的 Makefile

# Run all tests (PHP + KPHP)
$ make test