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.
Bitfields are stored as integers. They may be specified with the binary integer notation, which makes the individual bits visible.
<?php
$bitfield = 0b111; // 7
?>
See also How to use bitmasks in PHP.
Related : Bitmask, Bitwise Operators, Constant Combination, integer
Related packages : thesmart/bitfield