cmp() public méthode

1 if the first value is greater than the second. 0 if the two values are equivalent.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/cmp/
public cmp ( mixed | self $expression1, mixed | self $expression2 )
$expression1 mixed | self
$expression2 mixed | self
Exemple #1
0
 /**
  * Compares two values and returns:
  * -1 if the first value is less than the second.
  * 1 if the first value is greater than the second.
  * 0 if the two values are equivalent.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/cmp/
  * @see Expr::cmp
  * @param mixed|Expr $expression1
  * @param mixed|Expr $expression2
  * @return self
  */
 public function cmp($expression1, $expression2)
 {
     $this->expr->cmp($expression1, $expression2);
     return $this;
 }