PHP Arithmetic Operators

Examples

Addition: 10 + 5 = 15
Subtraction: 10 - 5 = 5
Multiplication: 10 * 5 = 50
Division: 10 / 5 = 2
Modulus: 10 % 5 = 0

Explanation

The addition operator (+) adds two numbers together. The subtraction operator (-) subtracts one number from another. The multiplication operator (*) multiplies two numbers. The division operator (/) divides one number by another. The modulus operator (%) returns the remainder after division.

Back to Index