Arithmetic Operations in PHP
Addition: 10 + 5 = 15
Subtraction: 20 - 8 = 12
Multiplication: 6 * 4 = 24
Division: 50 / 10 = 5
Modulus: 15 % 4 = 3
Exponentiation: 2 ** 3 = 8
Arithmetic operators in PHP perform mathematical operations on numeric values.
- The addition operator (+) adds two numbers together.
- The subtraction operator (-) subtracts the second number from the first.
- The multiplication operator (*) multiplies two numbers.
- The division operator (/) divides the first number by the second.
- The modulus operator (%) returns the remainder of the division.
- The exponentiation operator (**) raises the first number to the power of the second.