PHP code example of sy-records / alphaid

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

    

sy-records / alphaid example snippets


use Luffy\AlphaID;

$id = new AlphaID();
$code = $id->encode(PHP_INT_MAX);
var_dump($code, $id->decode($code));

$code = $id->encode(PHP_INT_MAX, PHP_VERSION_ID);
var_dump($code, $id->decode($code));

$code = $id->encode([PHP_INT_MAX, PHP_VERSION_ID]);
var_dump($code, $id->decode($code));