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;
    }