1. Go to this page and download the library: Download philippelyp/llmuid 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/ */
philippelyp / llmuid example snippets
use LLMUID\LLMUID;
$r = new LLMUID();
$id = $r->mint(); // K7-M3-XR-9D-Q2
$r->resolve('K7-M3-XR-9D-Q2'); // K7-M3-XR-9D-Q2, pristine
$r->resolve('`k7 m3 xr 9d q2`'); // K7-M3-XR-9D-Q2, delimiters and case
$r->resolve('K7-M3-XB-9D-Q2'); // K7-M3-XR-9D-Q2, one substitution
$r->resolve('K7-M3-RX-9D-Q2'); // K7-M3-XR-9D-Q2, one transposition
$r->resolve('K7-M3-ZZ-ZZ-Q2'); // FALSE
$r->last_error(); // 'Checksum failed and no issued
// identifier is within 2 edits'
$id = $r->mint('invoice');
$r->resolve($id, 'invoice'); // the identifier
$r->resolve($id, 'receipt'); // FALSE
$r->last_error(); // 'Wrong context: ... was not issued
// under this context'
$issued = $r->registry(); // array of canonical renderings
$r = new LLMUID($issued); // same registry, new process