Arithmetic operators allow for the performance mathematical operations on numeric values in PHP.

In these examples, variables $number1, $number2, and $number 3 have been assigned a numeric value of 1, 2, and 3, respectively.

Example one uses the Addition (+) operator to sum the values of $number1 and $number2.

Example two uses the Subtraction (-) operator to find the difference of the values of $number2 and $number1.

Example three uses the Multiplication (*) operator to find the product of the values of $number2 and $number3.

Example four uses the Division (/) operator to find quotient of the value of $number3 and itself.


1 + 2 = 3
2 - 1 = 1
2 x 3 = 6
3 รท 3 = 1