PHP code example of shanginn / smolid
1. Go to this page and download the library: Download shanginn/smolid 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/ */
shanginn / smolid example snippets
// Basic:
$id = (new Smolid())->generate(); // Yd0AwdV80s8oRs0odN8hZ
// Custom alphabet:
$id = (new Smolid(alphabet: Alphabet::HEXADECIMAL_UPPERCASE))->generate(); // FE3782DA33AAA5ED96BEC
// Custom size:
$id = (new Smolid())->generate(size: 10); // N0BRRpNgpE