}
return implode('||', $elements);
}
+
+ /**
+ * Returns the SQL text to be used in order to perform one bitwise XOR operation
+ * between 2 integers.
+ *
+ * @param integer int1 first integer in the operation
+ * @param integer int2 second integer in the operation
+ * @return string the piece of SQL code to be used in your statement.
+ */
+ public function sql_bitxor($int1, $int2) {
+ return '( ~' . $this->sql_bitand($int1, $int2) . ' & ' . $this->sql_bitor($int1, $int2) . ')';
+ }
}