README.md
PHP BitArray
============
[![PHP package](https://github.com/chdemko/php-bitarray/workflows/PHP%20Composer/badge.svg?branch=develop)](https://github.com/chdemko/php-bitarray/actions/workflows/php.yml)
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-bitarray.svg?logo=Codecov&logoColor=white)](https://coveralls.io/r/chdemko/php-bitarray?branch=develop)
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/php-bitarray/develop.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/chdemko/php-bitarray/?branch=develop)
[![Code Climate](https://codeclimate.com/github/chdemko/php-bitarray/badges/gpa.svg)](https://codeclimate.com/github/chdemko/php-bitarray/)
[![CodeFactor](https://img.shields.io/codefactor/grade/github/chdemko/php-bitarray/develop.svg?logo=codefactor)](https://www.codefactor.io/repository/github/chdemko/php-bitarray)
[![Codacy](https://img.shields.io/codacy/grade/4f8e197cf7654a8fa33c5ffe6b55b050.svg?logo=codacy)](https://app.codacy.com/gh/chdemko/php-bitarray/dashboard)
[![PHP versions](https://img.shields.io/packagist/dependency-v/chdemko/bitarray/php?logo=php&logoColor=white)](https://packagist.org/packages/chdemko/bitarray)
[![Latest Stable Version](https://img.shields.io/packagist/v/chdemko/bitarray.svg?logo=packagist&logoColor=white)](https://packagist.org/packages/chdemko/bitarray)
[![Downloads](https://img.shields.io/packagist/dt/chdemko/bitarray.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgLS0+Cgo8c3ZnCiAgIHdpZHRoPSI4MDBweCIKICAgaGVpZ2h0PSI4MDBweCIKICAgdmlld0JveD0iMCAwIDI0IDI0IgogICBmaWxsPSJub25lIgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJ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NS42ODM0IDcuOTAyMzcgMTYuMzE2NiA4LjI5Mjg5IDE2LjcwNzFMMTEuMjkyOSAxOS43MDcxQzExLjY4MzQgMjAuMDk3NiAxMi4zMTY2IDIwLjA5NzYgMTIuNzA3MSAxOS43MDcxTDE1LjcwNzEgMTYuNzA3MUMxNi4wOTc2IDE2LjMxNjYgMTYuMDk3NiAxNS42ODM0IDE1LjcwNzEgMTUuMjkyOUMxNS4zMTY2IDE0LjkwMjQgMTQuNjgzNCAxNC45MDI0IDE0LjI5MjkgMTUuMjkyOUwxMyAxNi41ODU4VjExWiIKICAgICBmaWxsPSIjMDAwMDAwIgogICAgIGlkPSJwYXRoMiIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmIiAvPgo8L3N2Zz4K)](https://packagist.org/packages/chdemko/bitarray)
[![Latest Unstable Version](https://poser.pugx.org/chdemko/bitarray/v/unstable.svg)](https://packagist.org/packages/chdemko/bitarray)
[![License](https://img.shields.io/github/license/chdemko/php-bitarray.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgLS0+Cgo8c3ZnCiAgIGhlaWdodD0iODAwcHgiCiAgIHdpZHRoPSI4MDBweCIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iX3gzMl8iCiAgIHZpZXdCb3g9IjAgMCA1MTIgNTEyIgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBzb2RpcG9kaTpkb2NuYW1lPSJiYWxhbmNlLTEtc3ZncmVwby1jb20uc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMiAoMGEwMGNmNTMzOSwgMjAyMi0wMi0wNCkiCiAgIHhtbG5zOmlua3NjYXBlPSJodHRwOi8vd3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AtMjIuNjYzLDMyLjk2OS0yMi42NjMsMzIuOTY5Yy0xOS4yMzMsMC0yOC44NSwxNS4xMDEtMjguODUsMzMuNjQ4aDIyOC4wMzNjMC0xOC41NDYtOS42MTYtMzMuNjQ4LTI4Ljg0NS0zMy42NDggICBjMCwwLDAuNjg2LTMyLjk2OS0yMi42NjgtMzIuOTY5Yy03LjMwNSwwLTE2LjE1OSwwLTI0Ljg3NCwwdi0yMy44NThoLTEzLjIwM1YxNDEuM2gtOC41MDd2LTI0LjIzICAgYzQ1LjA3MiwzLjAxNSw5Ny40NTcsMjIuNjA0LDEzNC42NCwzNC4wNzJsLTYwLjM1OCwxNzEuMTM0aC0xMS4zODdjMTEuNDk2LDM4LjAyNSw0Ni44MDQsNjUuNzM2LDg4LjU5LDY1LjczNiAgIGM0MS43OSwwLDc3LjA5OC0yNy43MTEsODguNTk0LTY1LjczNkg1MDAuNjA5eiBNMTQxLjI0MywzMjIuMjc1SDM1Ljk0OEw4OC41OTUsMTczTDE0MS4yNDMsMzIyLjI3NXogTTM3MC43NTgsMzIyLjI3NUw0MjMuNDEsMTczICAgbDUyLjY0MywxNDkuMjc1SDM3MC43NTh6IgogICBpZD0icGF0aDMzNzkiCiAgIHN0eWxlPSJmaWxsOiNmZmZmZmYiIC8+CjwvZz4KPC9zdmc+Cg==)](https://raw.githubusercontent.com/chdemko/php-bitarray/develop/LICENSE)
[![Last commit](https://img.shields.io/github/last-commit/chdemko/php-bitarray/develop?logo=github)](https://github.com/chdemko/php-bitarray/commit/develop/)
[![Documentation Status](https://img.shields.io/readthedocs/php-bitarray.svg?logo=read-the-docs&logoColor=white)](http://php-bitarray.readthedocs.io/en/latest/?badge=latest)
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/php-bitarray.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyB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GU9ImZpbGw6I2ZmZmZmZiIgLz4KPC9zdmc+Cg==)](http://php-bitarray.readthedocs.io/en/latest/)
[![Code Size](https://img.shields.io/github/languages/code-size/chdemko/php-bitarray.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgLS0+Cgo8c3ZnCiAgIGZpbGw9IiMwMDAwMDAiCiAgIHdpZHRoPSI4MDBweCIKICAgaGVpZ2h0PSI4MDBweCIKICAgdmlld0JveD0iMCAwIDI0IDI0IgogICBkYXRhLW5hbWU9IkxheWVyIDEiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzE0NzYiCiAgIHNvZGlwb2RpOmRvY25hbWU9IndlaWdodC1zdmdyZXBvLWNvbS5zdmciCiAgIGlua3NjYXBlOnZlcnNpb249IjEuMS4yICgwYTAwY2Y1MzM5LCAyMDIyLTAyLTA0KSIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcwogICAgIGlkPSJkZWZzMTQ4MCIgLz4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaWQ9Im5hbWVkdmlldzE0NzgiCiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yP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wLDAsMS0xLTFWN0ExLDEsMCwwLDEsNSw2SDYuMzdsLjQyLDMuMzdhMywzLDAsMCwwLDMsMi42M2g0LjQ2YTMsMywwLDAsMCwzLTIuNjNMMTcuNjMsNkgxOWExLDEsMCwwLDEsMSwxWm0tNi0zSDEwYTEsMSwwLDAsMCwwLDJoNGExLDEsMCwwLDAsMC0yWiIKICAgICBpZD0icGF0aDE0NzQiCiAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZiIgLz4KPC9zdmc+Cg==)](http://php-bitarray.readthedocs.io/en/latest/)
BitArray for PHP.
This project manipulates compact array of bit values stored internally as strings.
The bit arrays may have variable length specified when an object is created using either:
* a specific size;
* a traversable collection;
* a string representation of bits;
* a json representation of bits;
* a slice from another bit array;
* a concatenation from two others bit arrays.
The project provides methods to get and set bits values using PHP natural syntax as well as the iterator facility offered by the PHP `foreach` language construct.
It also provides methods for bitwise logical operations between two bit arrays `and`, `or`, `xor` and the `not` operation.
This project uses:
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer) for checking PHP code style
* [PHPUnit](http://phpunit.de/) for unit test (100% covered)
* [Sphinx](https://www.sphinx-doc.org/) and [Doxygen](https://www.doxygen.nl/) for the
[documentation](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
Instructions
------------
Using composer: either
~~~shell
$ composer create-project chdemko/bitarray:1.2.x-dev --dev; cd bitarray
~~~
or create a `composer.json` file containing
~~~json
{
"require": {
"chdemko/bitarray": "1.2.x-dev"
}
}
~~~
and run
~~~shell
$ composer install
~~~
Create a `test.php` file containing
~~~php
<?php
require __DIR__ . '/vendor/autoload.php';
use chdemko\BitArray\BitArray;
$bits = BitArray::fromTraversable([true,false,false,true]);
echo $bits . PHP_EOL;
~~~
This should print
~~~console
1001
~~~
See the [examples](https://github.com/chdemko/php-bitarray/tree/master/examples) folder for more information.
Documentation
-------------
Run
~~~shell
$ sudo apt install doxygen python3-pip python3-virtualenv
$ virtualenv venv
$ venv/bin/activate
(venv) $ pip install -r docs/requirements.txt
(venv) $ sphinx-build -b html docs/ html/
(venv) $ deactivate
$
~~~
if you want to create local documentation with Sphinx.
Citation
--------
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-bitarray/develop/cite.bib)). You are also pleased to send me an email to chdemko@gmail.com.
* authors: Christophe Demko
* title: php-bitarray: a PHP library for handling bit arrays
* year: 2014
* how published: https://packagist.org/packages/chdemko/bitarray/