Skip to content

nikeee/php-bit-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bit-array CI CD Packagist Version

A bit-array implementation for PHP. Compatible with the BitArray of ts-ds.

Depending on the extensions that are available, GMP is used under the hood for faster bit operations.

Installation

composer require nikeee/bit-array

Usage

<?php
require_once 'vendor/autoload.php';

use Nikeee\BitArray\BitArray;

$arr = BitArray::create(8);

$arr->set(1, true)
    ->set(2, true)
    ->set(4, true);

$arr->applyBitwiseNot();

echo "Bits: " . $arr->toBitString() . "\n";

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages