subtract() public method

The arguments can be any valid expression as long as they resolve to numbers and/or dates.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/subtract/
public subtract ( mixed | self $expression1, mixed | self $expression2 )
$expression1 mixed | self
$expression2 mixed | self
Beispiel #1
0
 /**
  * Subtracts two numbers to return the difference. The second argument is
  * subtracted from the first argument.
  *
  * The arguments can be any valid expression as long as they resolve to numbers and/or dates.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/subtract/
  * @see Expr::subtract
  * @param mixed|Expr $expression1
  * @param mixed|Expr $expression2
  * @return self
  */
 public function subtract($expression1, $expression2)
 {
     $this->expr->subtract($expression1, $expression2);
     return $this;
 }