PHP code example of maximal / hyperloglog

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

    

maximal / hyperloglog example snippets


$hll = new HyperLogLog();
$hll->add('foo');
$hll->add('bar');
$hll->add('baz');
$hll->add('foo');
$hll->add('baz');
echo 'Unique items: ', $hll->count(), PHP_EOL; // Unique items: 3