PHP code example of pwm / uuid-v4
1. Go to this page and download the library: Download pwm/uuid-v4 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/ */
pwm / uuid-v4 example snippets
$uuidV4String = '30313233-3435-4637-b839-616263646566';
$uuidV4 = new UuidV4($uuidV4String); // the data type
assert($uuidV4 instanceof UuidV4);
assert($uuidV4String === (string)$uuidV4);
$uuidV4 = UuidV4::createFrom(random_bytes(16));
assert($uuidV4 instanceof UuidV4);
$seed = random_bytes(16);
assert((string)UuidV4::createFrom($seed) === (string)UuidV4::createFrom($seed));