This extension for PHP provides routines for manipulating bitsets.

WWW: https://pecl.php.net/package/Bitset