PHP code example of dmhendricks / hash-int

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

    

dmhendricks / hash-int example snippets


$num = 456;

/**
 * Create a 7-character hash from integer
 */
$hash = \CloudVerve\HashInt::hash( $num, 7 );

// Unhash the string
$unhashed = \CloudVerve\HashInt::unhash( $hash );

echo 'Hashed: ' . $hash . '<br />';
echo 'Unhashed: ' . $unhashed;