PHP code example of furiosojack / hashids-integer

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

    

furiosojack / hashids-integer example snippets

 php
    use FuriosoJack\HashidsInteger\Core\HashidsInteger;

     $hashers = new HashidsInteger("{/SvFtGNUZNw'aT$/'.t",10,"1234567890");
     $dcode = $hashers->encode([1,579144]);   
    // output: 49274776074

    $hashers = new HashidsInteger("{/SvFtGNUZNw'aT$/'.t",10,"abcdefghijklmnopq");
    $output = $hashers->encode([4,2]);
    //output: kjngeqfbgd

    $hashers = new HashidsInteger("{/SvFtGNUZNw'aT$/'.t",10,"abcdefghijklmnopq","hash");
    $output = $hasers->encode([4,2,15,21]);
    //output:hash-npfeiemcbq
    
    $hashers->decode("hash-npfeiemcbq");
    //output: array(4,2,15,21)