PHP code example of qlimix / uuid
1. Go to this page and download the library: Download qlimix/uuid library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
qlimix / uuid example snippets
use Qlimix\Id\Uuid\Uuid;
$uuid = new Uuid('ecf72764-f657-4ae9-9183-135b72bbad32');
$uuid2 = new Uuid('ecf72764-f657-4ae9-9183-135b72bbad32');
$bytes = $uuid->getBytes();
$string = $uuid->toString();
$uuid = Uuid::fromBytes($bytes);
if ($uuid->equals($uuid2)) {
// the same
}