1. Go to this page and download the library: Download hichxm/hyperloglog 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/ */
hichxm / hyperloglog example snippets
use Hichxm\HyperLogLog\HyperLogLog;
$hll = new HyperLogLog();
$hll->add('apple');
$hll->add('banana');
$hll->add('orange');
$hll->add('apple'); // duplicate
echo $hll->count();
new HyperLogLog(
int $counterBits = 5,
string $hashAlgorithm = 'xxh3'
);
$hll = new HyperLogLog(
counterBits: 10,
hashAlgorithm: 'sha256'
);