countFlags.php
Table of Contents
Functions
- countFlags() : int
- Counts the number of active flags (bits set to 1) in a bitmask.
Functions
countFlags()
Counts the number of active flags (bits set to 1) in a bitmask.
countFlags(int $mask) : int
This function is useful when you want to know how many flags are currently active.
Parameters
- $mask : int
-
The bitmask to analyze.
Tags
Return values
int —The number of bits set to 1 in the mask.