PHP code example of ordinary / uid
1. Go to this page and download the library: Download ordinary/uid 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/ */
ordinary / uid example snippets
$randomizer = new \Random\Randomizer(new \Random\Engine\Secure());
$clock = new \Ordinary\Clock\UTCClock();
$generator = new \Ordinary\UID\Generator($clock, $randomizer);
var_dump($generator->generate(4));
var_dump($generator->generateCustom('external-id-1'))