PHPackages                             maxwilms/bloom-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. maxwilms/bloom-filter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

maxwilms/bloom-filter
=====================

Bloom filter - a space-efficient probabilistic data structure for PHP 5.4+

v0.9.5(6y ago)714.2k↑85.7%MITPHPPHP &gt;=5.4CI failing

Since Jan 16Pushed 6y ago2 watchersCompare

[ Source](https://github.com/maxwilms/bloom-filter)[ Packagist](https://packagist.org/packages/maxwilms/bloom-filter)[ RSS](/packages/maxwilms-bloom-filter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (8)Used By (0)

PHP Bloom filter
================

[](#php-bloom-filter)

[![Build Status](https://camo.githubusercontent.com/340868d0851c35c731636ddd0a50333c02f1aac49c3ca06190a7246d152e7ee7/68747470733a2f2f7472617669732d63692e6f72672f6d617877696c6d732f626c6f6f6d2d66696c7465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/maxwilms/bloom-filter)[![Quality Score](https://camo.githubusercontent.com/885ab268e8088297af2188be135884a05ae7c0dff4e46579e1cce45450fed14f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d617877696c6d732f626c6f6f6d2d66696c7465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maxwilms/bloom-filter/)

A [Bloom filter](https://en.wikipedia.org/wiki/Bloom_filter) is a probabilistic data structure, that tests whether an element is member of a set. It will always confirm if the element is member of the set. But false-positives are possible.

When to use Bloom filters
-------------------------

[](#when-to-use-bloom-filters)

Use this data structure when you quickly need to confirm that a certain value does not exists in a large data set. For example a certain row is not present on your database (e.g., IP address, username, email).

Installation
------------

[](#installation)

First install [composer](https://getcomposer.org/).

Require the bloom filter via composer:

```
composer require maxwilms/bloom-filter

```

Now you are ready to use it!

Usage
-----

[](#usage)

```
