src/Util.php
public static function isBitSet( int $target, int $flag, int $mode ) : bool
    {
        switch($mode){
        case self::BITTEST_MODE_ALL:
            return ($target & $flag) === $flag;
            break;
        case self::BITTEST_MODE_ANY:
            return ($target & $flag) != 0;
        }

        return false;
    }
public static function isBitSet( int $target, int $flag, int $mode ) : bool
    {
        switch($mode){
        case self::BITTEST_MODE_ALL:
            return ($target & $flag) === $flag;
            break;
        case self::BITTEST_MODE_ANY:
            return ($target & $flag) != 0;
        }

        return false;
    }
public static function isBitSet ( int $ target , int $ flag , int $ mode ) : bool { switch ( $ mode ) { case self :: BITTEST_MODE_ALL : return ( $ target & $ flag ) === $ flag ; break ; case self :: BITTEST_MODE_ANY : return ( $ target & $ flag ) != 0 ; } return false ; }
Test if specified bit flag is set

@param int $target              target value to test
@param int $flag                target flag to test
@param int $mode                test mode(see BITTEST_MODE_XXX constants)

@return bool
Test if specified bit flag is set