PHP code example of jbroadway / distinctelements

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

    

jbroadway / distinctelements example snippets




am = [1, 2, 3, 4, 1, 2, 3, 4, 5, 4, 3, 1, 2];
$epsilon = 0.1;
$delta = 0.1;

$output = DistinctElements::streaming_algorithm ($stream, $epsilon, $delta);
var_dump ($output); // 5