Skip to content
Binding of the libuuid library with PHP thanks to PHP/FFI.
PHP Dockerfile Makefile C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include CS Nov 18, 2019
src Try to improve decoding speed Nov 18, 2019
.gitignore
Dockerfile
LICENSE Create LICENSE Nov 27, 2019
Makefile
README.md
bench.php Update bench to use PECL too Nov 18, 2019
composer.json
example.php

README.md

FFI libuuid

This repository contains a binding of the libuuid library with PHP thanks to PHP/FFI. So this requires PHP 7.4 to run.

For now this is mostly a proof of concept to demonstrate the power of the FFI extension. In future, if and when the performance of FFI improves, it could be a good alternative to the PECL UUID package.

Further details can be found in the following blog post PHP 7.4 FFI: What you need to know .

Installation

composer require jolicode/ffi-uuid

Usage

use JoliCode\Uuid\UuidGenerator;

$generator = new UuidGenerator();

echo $generator->v1();
echo $generator->v3('something');
echo $generator->v4();
echo $generator->v5('something');

Resources

You can’t perform that action at this time.