PHP code example of nikeee / bit-array
1. Go to this page and download the library: Download nikeee/bit-array library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nikeee / bit-array example snippets
Nikeee\BitArray\BitArray;
$arr = BitArray::create(8);
$arr->set(1, true)
->set(2, true)
->set(4, true);
$arr->applyBitwiseNot();
echo "Bits: " . $arr->toBitString() . "\n";