I\'m not sure if bitmask is the correct term. Let me explain:
In php, the error_reporting
function can be called multiple ways:
// Repor
The others have offered good suggestions, but these days it's much more common to pass in associative arrays instead of bitmasks. It's much more readable and allows you to pass in other variables other than just true/false values. Something like this:
myFunction(['includeHidden' => true, 'fileExts' => false, 'string' => 'Xyz']);
function myFunction($options) {
// Set the default options
$options += [
'includeHidden' => false,
'fileExts' => true,
'string' => 'Abc',
];
if ($options['includeHidden']) {
...
}
...
}