@param string $value
@param bool $is_negation

@return string[]
543325
protected static function parseEqualsInOperator($value, $is_negation)
    {
        if (strpos($value, ',') !== false) {
            $value = preg_split('/,/', $value);
        }

        return $is_negation ?
            [is_array($value) ? static::OPERATOR_NOT_IN : static::OPERATOR_NOT_EQUAL, $value]
            :
            [is_array($value) ? static::OPERATOR_IN : static::OPERATOR_EQUAL, $value];
    }
384863
private function spanContextFromString($value): array
    {
        $parts = explode(':', $value);

        if (count($parts) != 4) {
            throw new Exception('Malformed tracer state string.');
        }

        return [
            CodecUtility::hexToInt64($parts[0]),
            CodecUtility::hexToInt64($parts[1]),
            CodecUtility::hexToInt64($parts[2]),
            $parts[3],
        ];
    }
494323
protected static function parseOperatorAndValue($value, $is_negation)
    {
        if ($result = static::parseComparisonOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseLikeOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseNullOperator($value, $is_negation)) {
            return $result;
        }

        if ($result = static::parseEqualsInOperator($value, $is_negation)) {
            return $result;
        }

        throw new InvalidArgumentException(sprintf('Unable to parse operator or value from "%s"', $value));
    }
1004874
public function getNamePrefix($value)
    {
        if (empty($value)) {
            return null;
        }
        preg_match('/(?:\@(?P<prefix>INLINE))?(?P<value>.+)/is', $value, $matches);

        return [
            'prefix' => Helper::getValue($matches['prefix']),
            'value' => Helper::getValue($matches['value'])
        ];
    }
702768
public function ne($value, bool $is_column = false): WhereStatement
    {
        return $this->isNot($value, $is_column);
    }
312802
private function not($value) {
        switch (func_num_args()) {
            case 0 :
                return true;
            case 1 :
                return ! $value;
            case 2 :
                $varList = func_get_arg(1);
                
                if (is_array($varList)) {
                    return $this -> not($this -> maybe($value, $varList));
                }
                
                return $value == $varList;
            default :
                $varList = func_get_args();
                $value = array_shift($varList);
                
                return $this -> not($this -> maybe($value, $varList));
        }
    }
514851
private function isReference(&$value): array
  {
    switch (true)
    {
      case is_bool($value):
      case is_null($value):
      case is_int($value):
      case is_string($value):
      case is_double($value):
      case is_resource($value):
        $ref = $this->testSeen($value);
        break;

      case is_object($value):
        $ref = $this->testSeenObject($value);
        break;

      case is_array($value):
        $ref = $this->testSeenArray($value);
        break;

      default:
        throw new FallenException('type', gettype($value));
    }

    $id = ($ref===null) ? sizeof($this->seen) - 1 : null;

    return [$id, $ref];
  }
1012413
public static function stripTags( $value, $allowable_tags = NULL )
    {
        if ( is_string($value) ){
            $res = strip_tags($value, $allowable_tags);
            return $res;
        }
        elseif ( is_array($value) ){
            $array = $value;
            foreach( $array as $key => $value ){
                $array[$key] = self::stripTags( $value, $allowable_tags );
            }
            return $array;
        }
        elseif ( is_object($value) ){
            $object = $value;
            $vars = get_object_vars($object);
            foreach( $vars as $key => $value ){
                $object->$key = self::stripTags( $value );
            }
            return $object;
        }
        return $value;
    }
444233
public static function make($value)
    {
        $value = static::prepareValue($value);
        $is_negation = static::parseIsNegation($value);
        list($operator, $value) = static::parseOperatorAndValue($value, $is_negation);

        return new static($operator, $value, $is_negation);
    }
1119935
public static function toBooleanEx($value) {
		if (isset($value)) {
			if (is_bool($value)) {
				return $value;
			}
			$value = strtolower(trim($value));
			if (in_array($value, self::$trueValues)) {
				return true;
			}
			if (in_array($value, self::$falseValues)) {
				return false;
			}
		}
		
		throw new \n2n\log4php\LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to boolean.");
	}
948503
public function parseBooleanValue($value)
    {
        if (is_bool($value)) {
            return $value;
        }
        switch (strtolower($value)) {
            case 'true':
                return true;
            case 'false':
                return false;
        }

        throw new RuntimeException("Unknown boolean value '{$value}'.");
    }
25536
protected function getPossibleObjectTypes($value): array
    {
        return array_filter($this->types, function($type) use ($value) {
            return ((class_exists($type) || interface_exists($type)) && is_a($value, $type))
                || ($type === 'string' && method_exists($value, '__toString'))
                || (in_array($type, ['object', 'array']) && $type instanceof stdClass);
        });
    }
948466
protected function interpretAsBoolean($value)
    {
        if (is_bool($value)) {
            return $value;
        }

        if (is_numeric($value)) {
            return $value != 0;
        }

        if (is_string($value)) {

            $value = trim($value);

            if ('' === $value || preg_match('#^n|no|f|false|nee|off|disabled|inactive&#', trim($value))) {
                return false;
            }

            return true;
        }

        if (is_array($value) || $value instanceof Collection) {
            return count($value) > 0;
        }

        return (bool) $value;
    }
1038322
public static function notin($value, $nums)
	{
		if (! is_array($nums))
		{
			$nums = explode(',', $nums);
		}
		return ! in_array($value, $nums);
	}
420925
function is( $column, $value, $not = false ) {

        $bang = $not ? "!" : "";
        $or = $not ? " AND " : " OR ";
        $novalue = $not ? "1=1" : "0=1";
        $not = $not ? " NOT" : "";

        // always treat value as array
        if ( !is_array( $value ) ) {

            $value = array( $value );

        }

        // always quote column identifier
        $column = $this->quoteIdentifier( $column );

        if ( count( $value ) === 1 ) {

            // use single column comparison if count is 1

            $value = $value[ 0 ];

            if ( $value === null ) {

                return $column . " IS" . $not . " NULL";

            } else {

                return $column . " " . $bang . "= " . $this->quote( $value );
            }

        } else if ( count( $value ) > 1 ) {

            // if we have multiple values, use IN clause

            $values = array();
            $null = false;

            foreach ( $value as $v ) {

                if ( $v === null ) {

                    $null = true;

                } else {

                    $values[] = $this->quote( $v );

                }

            }

            $clauses = array();

            if ( !empty( $values ) ) {

                $clauses[] = $column . $not . " IN ( " . implode( ", ", $values ) . " )";

            }

            if ( $null ) {

                $clauses[] = $column . " IS" . $not . " NULL";

            }

            return implode( $or, $clauses );

        }

        return $novalue;

    }
1358782
protected function getNegationWhenConfigured($value, $configuration)
    {
        if (!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
            return $value;
        }

        return !((bool)$value);
    }
905820
public static function bool(&$value=false, bool $flatten=false) {
		// Short circuit.
		if (\is_bool($value)) {
			return;
		}

		if (! $flatten && \is_array($value)) {
			foreach ($value as $k=>$v) {
				static::bool($value[$k]);
			}
		}
		else {
			// Evaluate special cases.
			if (\is_string($value)) {
				$value = \strtolower($value);
				if (\in_array($value, constants::TRUE_BOOLS, true)) {
					$value = true;
				}
				elseif (\in_array($value, constants::FALSE_BOOLS, true)) {
					$value = false;
				}
			}
			elseif (\is_array($value)) {
				$value = !! \count($value);
			}

			if (! \is_bool($value)) {
				try {
					$value = (bool) $value;
				} catch (\Throwable $e) {
					$value = false;
				}
			}
		}
	}