Download the PHP package brandonbronisz/php-bloom without Composer

On this page you can find all versions of the php package brandonbronisz/php-bloom. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-bloom

php-bloom

Build and Test

php-bloom is a native PHP 8 extension that provides a compact Bloom filter implementation for fast probabilistic membership checks.

Bloom filters answer one question efficiently: "have I probably seen this value before?" A negative result means the value is definitely absent. A positive result means the value might be present and should be verified against an authoritative store when false positives matter.

Requirements

Install With PIE

PIE builds and enables the extension for the target PHP installation. On Unix-like systems, make sure the PHP development tools and compiler toolchain are installed first. On Windows, PIE installs from the pre-built DLL archives published on GitHub releases.

Verify the extension is loaded:

IDE Stubs

Install the optional stubs package in projects that use php-bloom to get IDE completion, parameter hints, return types, and inline docs without requiring the extension to be loaded in the IDE environment:

Build

Load the built module directly:

Run the PHPT suite:

Build and test the extension on Windows:

Quick Start

For correctness-sensitive paths, treat positive results as a pre-check and then verify them against the real source of truth:

API

Functions

Bloom\Filter

Export And Import

Filters can be serialized to a compact binary format and loaded later:

The export format is binary-safe and starts with the BLM1 magic header.

Use Cases

Good fits:

Benchmarks

Benchmark results are workload and machine dependent. The reports below were captured locally on June 13, 2026 with PHP 8.2.30 and extension version 0.1.0.

Extension vs Pure PHP

Command:

Configuration:

Report:

Operation C extension ns/op Pure PHP ns/op Result
construct 21,041.0 35,041.0 1.67x faster
add 54.1 7,212.8 133.24x faster
lookup present 62.4 7,184.1 115.18x faster
lookup absent 70.2 5,865.6 83.53x faster
export 7,417.0 18,167.0 2.45x faster
import 4,167.0 519,709.0 124.72x faster
stats 649,792.0 3,706,667.0 5.70x faster

For this run, the filter used 958,506 bits, 7 hash rounds, and 119,814 bytes of bitset storage.

MySQL Suppression Lookup

The MySQL benchmark compares direct indexed lookups against a Bloom pre-check plus MySQL verification. The Bloom-only path is reported as a raw lookup ceiling, but it is not correctness-safe because false positives are possible.

Setup:

Command used for this report:

Configuration:

Report:

Mix Direct MySQL Bloom + MySQL verification MySQL queries avoided Bloom false positives Speedup
99% absent / 1% present 4.395 s 153.586 ms 9,636 264 28.62x
95% absent / 5% present 4.740 s 409.401 ms 9,245 255 11.58x
90% absent / 10% present 5.095 s 709.813 ms 8,754 246 7.18x
50% absent / 50% present 4.927 s 3.042 s 4,856 144 1.62x

The benchmark shows the expected shape: the Bloom pre-check helps most when the traffic is negative-heavy. As the present rate rises, more positive Bloom results must be verified by MySQL, so the benefit narrows.

More benchmark details are in benchmarks/README.md and benchmarks/mysql/README.md.

Development

Regenerate arginfo after changing bloom.stub.php:

Clean generated build output:

Useful layout:

License

MIT. See LICENSE.


All versions of php-bloom with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0 <9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brandonbronisz/php-bloom contains the following files

Loading the files please wait ...