jolicode / ffi-uuid
Bind libuuid to PHP thanks to FFI
Installs: 66 651
Dependents: 0
Suggesters: 0
Security: 0
Stars: 40
Watchers: 15
Forks: 2
Open Issues: 0
Requires
- php: >= 7.4
- ext-ffi: *
This package is auto-updated.
Last update: 2024-11-05 13:23:21 UTC
README
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');