private function bitwiseIn(
        $max,
        $matching
    ) {
        $result = [];
        for ($i = 1; $i <= $max; ++$i) {
            if ($i & $matching) {
                $result[] = $i;
            }
        }

        return $result;
    }
private function bitwiseIn(
        $max,
        $matching
    ) {
        $result = [];
        for ($i = 1; $i <= $max; ++$i) {
            if ($i & $matching) {
                $result[] = $i;
            }
        }

        return $result;
    }
private function bitwiseIn ( $ max , $ matching ) { $ result = [ ] ; for ( $ i = 1 ; $ i <= $ max ; ++ $ i ) { if ( $ i & $ matching ) { $ result [ ] = $ i ; } } return $ result ; }
Given bitwise operators, and the value we want to match against,
generate a minimal array for an IN query.

@param int $max
@param     $matching

@return array
Given bitwise operators and the value we want to match against generate a minimal array for an IN query .