isValidMask.php
Table of Contents
Functions
- isValidMask() : bool
- Validates that a bitmask contains only allowed flags.
Functions
isValidMask()
Validates that a bitmask contains only allowed flags.
isValidMask(int $mask, int $allowed) : bool
Parameters
- $mask : int
-
The bitmask to validate.
- $allowed : int
-
A bitmask of all valid flags.
Tags
Return values
bool —Returns true if all bits in $mask are present in $allowed, false otherwise.