Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 929 Bytes

README.md

File metadata and controls

44 lines (29 loc) · 929 Bytes

Build Status

KPHP UUID demo library

WARNING: this is not a real UUID library. It's just an example project for my KPHP testing/benchmarking article.

Installation via composer (published at packagist.org/packages/quasilyte/kphp-uuid):

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

Usage:

<?php

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

use Quasilyte\KPHP\Uuid\UUID;

var_dump(UUID::v4());

Running tests and benchmarks:

# 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

This repository includes a Makefile for convenience:

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