0 if the two strings are equal.
-1 if the first string is “less than” the second string.
The arguments can be any valid expression as long as they resolve to strings.
public strcasecmp ( mixed | self $expression1, mixed | self $expression2 ) | ||
$expression1 | mixed | self | |
$expression2 | mixed | self |
/** * Performs case-insensitive comparison of two strings. Returns * 1 if first string is “greater than” the second string. * 0 if the two strings are equal. * -1 if the first string is “less than” the second string. * * The arguments can be any valid expression as long as they resolve to strings. * * @see http://docs.mongodb.org/manual/reference/operator/aggregation/strcasecmp/ * @see Expr::strcasecmp * @param mixed|Expr $expression1 * @param mixed|Expr $expression2 * @return self */ public function strcasecmp($expression1, $expression2) { $this->expr->strcasecmp($expression1, $expression2); return $this; }