Returns the SQL that performs the bitwise AND on two values.

@param string $value1
@param string $value2
@return string
426497
public function bitAnd( $value1, $value2 )
    {
        $value1 = $this->getIdentifier( $value1 );
        $value2 = $this->getIdentifier( $value2 );
        return "( {$value1} & {$value2} )";
    }
1362767
function bitwise_and($x)
    {
        switch (MATH_BIGINTEGER_MODE) {
            case self::MODE_GMP:
                $temp = new static();
                $temp->value = gmp_and($this->value, $x->value);

                return $this->_normalize($temp);
            case self::MODE_BCMATH:
                $left = $this->toBytes();
                $right = $x->toBytes();

                $length = max(strlen($left), strlen($right));

                $left = str_pad($left, $length, chr(0), STR_PAD_LEFT);
                $right = str_pad($right, $length, chr(0), STR_PAD_LEFT);

                return $this->_normalize(new static($left & $right, 256));
        }

        $result = $this->copy();

        $length = min(count($x->value), count($this->value));

        $result->value = array_slice($result->value, 0, $length);

        for ($i = 0; $i < $length; ++$i) {
            $result->value[$i]&= $x->value[$i];
        }

        return $this->_normalize($result);
    }
311503
public static function compare($price1, $price2)
    {
        //====================================================================//
        // Check Both Prices are valid
        if (!self::isValid($price1) || !self::isValid($price2)) {
            Splash::log()->war(__FUNCTION__." : Given Prices are invalid");
            if (!self::isValid($price1)) {
                Splash::log()->www(__FUNCTION__." Price 1", $price1);
            }
            if (!self::isValid($price2)) {
                Splash::log()->www(__FUNCTION__." Price 2", $price2);
            }

            return false;
        }
        //====================================================================//
        // Compare Base Price
        if (((bool) $price1["base"]) != ((bool) $price2["base"])) {
            return false;
        }
        //====================================================================//
        // Compare Price
        return self::compareAmounts($price1, $price2);
    }
882031
public function notBetween($column, $value1, $value2)
	{
		return $this->between($column, $value1, $value2, 'AND', true);
	}
1156814
def to_same(value1, value2, ctx):
    
    if type(value1) == type(value2):
        return value1, value2

    try:
        # try converting to two decimals
        return to_decimal(value1, ctx), to_decimal(value2, ctx)
    except EvaluationError:
        pass

    try:
        # try converting to two dates
        d1, d2 = to_date_or_datetime(value1, ctx), to_date_or_datetime(value2, ctx)

        # if either one is a datetime, then the other needs to become a datetime
        if type(value1) != type(value2):
            d1, d2 = to_datetime(d1, ctx), to_datetime(d2, ctx)
        return d1, d2
    except EvaluationError:
        pass

    # try converting to two strings
    return to_string(value1, ctx), to_string(value2, ctx)
650688
function bitwise_leftShift($shift)
    {
        $temp = new Math_BigInteger();

        switch (MATH_BIGINTEGER_MODE) {
            case MATH_BIGINTEGER_MODE_GMP:
                static $two;

                if (!isset($two)) {
                    $two = gmp_init('2');
                }

                $temp->value = gmp_mul($this->value, gmp_pow($two, $shift));

                break;
            case MATH_BIGINTEGER_MODE_BCMATH:
                $temp->value = bcmul($this->value, bcpow('2', $shift, 0), 0);

                break;
            default: // could just replace _rshift with this, but then all _lshift() calls would need to be rewritten
                     // and I don't want to do that...
                $temp->value = $this->value;
                $temp->_lshift($shift);
        }

        return $this->_normalize($temp);
    }
787071
public function orBetween(string $value, string $field1, string $field2)
    {
        $this->between($value, $field1, $field2);
        $this->convertToOrJunction();

        return $this;
    }
119421
@Pure
	@Inline(value="($1 | $2)", constantExpression=true)
	public static long bitwiseOr(long a, long b) {
		return a | b;
	}
848854
public function bitwiseLeftShift($shift)
    {
        $temp = new BigInteger();
        switch (MATH_BIGINTEGER_MODE) {
            case MATH_BIGINTEGER_MODE_GMP:
                static $two;
                if (! isset($two)) {
                    $two = gmp_init('2');
                }
                $temp->value = gmp_mul($this->value, gmp_pow($two, $shift));
                break;
            case MATH_BIGINTEGER_MODE_BCMATH:
                $temp->value = bcmul($this->value, bcpow('2', $shift, 0), 0);
                break;
            default:
                // and I don't want to do that...
                $temp->value = $this->value;
                $temp->protectedLShift($shift);
        }
        return $this->protectedNormalize($temp);
    }
530692
public function between($column, $value1, $value2, string $separator = 'AND', bool $not = false)
	{
		$this->wheres[] =
		[
			'type'      => 'between',
			'column'    => $column,
			'value1'    => $value1,
			'value2'    => $value2,
			'separator' => $separator,
			'not'       => $not,
		];

		return $this;
	}
710479
protected function splitQueryValue($value)
    {
        $data = explode('=', $value, 2);
        if (1 === count($data)) {
            $data[] = null;
        }
        return $data;
    }
1181364
public static function OperatorMod( ValueProxy  $val1, ValueProxy  $val2 )
	{
		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return  $val2->Promote( $val1)->Mod( $val2 );

			case 0:
				return  $val1->Mod( $val2 );

			case 1:
				return  $val1->Mod( $val1->Promote( $val2 ) );

			default:

				if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
					return  $val2->Promote( $val1)->Mod( $val2);

				throw XPath2Exception::withErrorCodeAndParams("XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:mod",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val1 ), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val2 ), XmlTypeCardinality::One )
					)
				);
		}
	}
128133
public static function areNotEqual($value1, $value2): bool
    {
        if (static::isEquatable($value1) && static::areSameType($value1, $value2)) {
            return !$value1->equals($value2);
        }

        return $value1 != $value2;
    }
520910
public function whereNotBetween($column, $value, $value2 = null)
    {
        if (is_null($value2)) {
            if (!is_array($value)) {
                throw new \InvalidArgumentException(Lang::get('_DB_PARAM_ERROR_WHERE_BETWEEN_'));
            }
            $val = $value;
        } else {
            $val = [$value, $value2];
        }
        $this->conditionFactory($column, $val, 'NOT BETWEEN');
        return $this;
    }
302547
private function compareLong($value1, $value2, $operator)
    {
        switch ($operator) {
            case FieldExpression::EQUALS:
                return $value1 === $value2;

            case FieldExpression::NOT_EQUALS:
                return $value1 !== $value2;

            case FieldExpression::GT:
                return $value1 > $value2;

            case FieldExpression::LT:
                return $value1 < $value2;
        }

        $errMsg = 'unknown field operator';
        throw new InvalidArgumentException($errMsg);
    }
144004
public static function compare($value1, $value2)
    {
        if (self::isIntlLoaded()) {
            return self::getCollator()->compare($value1, $value2);
        }
        
        return strnatcmp($value1, $value2);
    }
133458
protected function processScalarValue($value)/*# : string */
    {
        if (ClauseInterface::NO_VALUE == $value) {
            return '?';
        } elseif (is_null($value) || is_bool($value)) {
            return strtoupper(var_export($value, true));
        } else {
            return $this->getBuilder()->getParameter()->getPlaceholder($value);
        }
    }