All Projects → jolicode → ffi-uuid

jolicode / ffi-uuid

Licence: MIT license
Binding of the libuuid library with PHP thanks to PHP/FFI.

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects
c
50402 projects - #5 most used programming language

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].