1. Go to this page and download the library: Download drlenux/hash-helper 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/ */
drlenux / hash-helper example snippets
use Drlenux\HashHelper\hash\MixedHashHelper;
$helper = new MixedHashHelper();
$data = ...; // Your big data
$hash = $helper->run($data);
var_dump([
'hash' => [
'string' => $hash->toString(), // Serializer + MD5 hash
'integer' => $hash->toInt() // Convert string hash to integer
]
]);
rlenux\HashHelper\hash\ArrayHashHelper;
use Drlenux\HashHelper\hash\ObjectHashHelper;
use Drlenux\HashHelper\hash\StringHashHelper;
$stringHelper = new StringHashHelper();
$arrayHelper = new ArrayHashHelper();
$objectHelper = new ObjectHashHelper();
$stringHash = $stringHelper->run('only string');
$arrayHash = $arrayHelper->run(['only' => 'array']);
$objectHash = $objectHelper->run((object) ['only' => 'object']);
// Output the hashes
var_dump($stringHash, $arrayHash, $objectHash);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.