This is a library for parsing and generating Cuvva IDs in the KSUID format.
Maintained by George Miller
© Cuvva Ltd - 2018
composer require cuvva/ksuid
use Cuvva\KSUID\KSUID;
require_once('vendor/autoload.php');
$id = KSUID::generate('resource');
echo("{$id}\n"); // resource_000F5wCycYNiduc6XpnXD5Xd
use Cuvva\KSUID\KSUID;
require_once('vendor/autoload.php');
$id = KSUID::parse('resource_000F5wCycYNiduc6XpnXD5Xd');
var_dump($id);
No tests until the library has been finalised
composer install cuvva/ksuid
./vendor/bin/phpunit --testdox tests/