PHPackages                             alb/phpketama - 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. alb/phpketama

ActiveLibrary

alb/phpketama
=============

v0.4.0(2y ago)744.6k↓11.8%11MITPHPPHP ^8.1

Since Oct 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/arnaud-lb/phpketama)[ Packagist](https://packagist.org/packages/alb/phpketama)[ RSS](/packages/alb-phpketama/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (1)

PHP Ketama
==========

[](#php-ketama)

This is a pure-PHP implementation of libketama, a consistent hashing library.

Compatibility with libketama
----------------------------

[](#compatibility-with-libketama)

PHP Ketama uses the same algorithm as libketama, and will always return the same results as libketama.

The API is not compatible.

Speed
-----

[](#speed)

Loading a cached continuum file is faster in PHP Ketama. Hashing is slower. As per the included benchmark, this makes PHP Ketama faster than libketama when doing up to 200 hashes per instance.

Usage
-----

[](#usage)

```
