Skip to content

Check the result is wrong  #9

Description

@km3945
echo number_format(memory_get_usage()).PHP_EOL;
$bf = new BloomFilter(100, 0.01,1);
$url='foo';
echo(print_r(strlen($url), 1).'#'.PHP_EOL);
$bf->add($url);
for ($i=0; $i<1000; $i++) {
	$bf->add($url.$i);
}
echo PHP_EOL;
var_dump($bf->has($url.'aaa')); // bool(true)          ??????????????
echo PHP_EOL;
echo (print_r($bf->getInfo(), 1).PHP_EOL);
echo number_format(memory_get_usage()).PHP_EOL;
sleep(3);
die();

Should return false

The first parameter is that?
Is to apply for memory capacity, or identify the maximum length of each character KEY

CentOS7.2
PHP 7.1.0 (cli) (built: Dec 5 2016 19:11:15) ( NTS )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions