Bitfield

A bitfield is a data structure that packs multiple related boolean flags or small integers into a single integer or sequence of bits, where each bit or group of bits represents a distinct value or state.

In PHP, bitfields are stored as integers.

<?php

    $bitfield = 0b111; // 7

?>

Documentation

See also How to use bitmasks in PHP.

Related : Bitmask, Bitwise Operators, Constant Combination

Related packages : thesmart/bitfield