hasAllFlags.php
Table of Contents
Functions
- hasAllFlags() : bool
- Checks whether **all** specified flags are set in a bitmask.
Functions
hasAllFlags()
Checks whether **all** specified flags are set in a bitmask.
hasAllFlags(int $mask, int $flags) : bool
This function is useful when you want to ensure that a set of flags are all active within a bitmask.
Parameters
- $mask : int
-
The original bitmask, potentially containing multiple flags combined with
|. - $flags : int
-
The flags to check (can be a single flag or multiple combined with
|).
Tags
Return values
bool —Returns true if all the given flags are present in the mask, false otherwise.