Bind libuuid to PHP thanks to FFI

v1.0.1 2021-01-06 10:31 UTC

This package is auto-updated.

Last update: 2022-09-06 14:38:56 UTC


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 .


composer require jolicode/ffi-uuid


use JoliCode\Uuid\UuidGenerator;

$generator = new UuidGenerator();

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