Tutorial for Arithmetic operators

What is Arithmetic operators?

The arithmetic operator is used to do simple arithmetic operations such as adding, subtracting, multiplying, and so on. Simple arithmetic behavior of numerical values may be implemented using these operators. The table below demonstrates how the findings are used and what outcomes are achieved.

  • Operator Name Example Result
  • + Addition $x + $y Sum of $x and $y
  • Subtraction $x - $y Difference of $x and $y
  • * Multiplication $x * $y Product of $x and $y
  • Division $x / $y Quotient of $x and $y
  • Modulus $x % $y Remainder of $x divided by $y
  • ** Exponentiation $x ** $y Result of raising $x to the $y'th power (Introduced in PHP 5.6)

Example:-

Output:-

Tagged : / / / / / /