PHP code example of ofilin / base64uid

1. Go to this page and download the library: Download ofilin/base64uid 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/ */

    

ofilin / base64uid example snippets


use ofilin\base64uid\Base64UID;

$uid = Base64UID::generate(); // iKtwBpOH2E

// 64^6 = 68 719 476 736 (combinations)
$uid = Base64UID::generate(6); // nWzfgA

// 64^10 + 64^9 + 64^8 = 1 171 217 378 093 039 616 (combinations)
$uid = Base64UID::generate(random_int(8, 10));