Math in PHP
Addition (+)
3 + 2 = 5
20 + 10 = 30
Subtraction (-)
20 - 3 = 17
Multiplication (*)
3 * 2 = 6
Division (/)
20 / 2 = 10
Exponents (**)
20 ** 3 = 8000
Explanation:
In PHP, the basic arithmetic operators work as expected:
- (+) Addition: Adds two numbers together.
- (-) Subtraction: Subtracts the second number from the first.
- (*) Multiplication: Multiplies two numbers.
- (/) Division: Divides the first number by the second.
- (**) Exponentiation: Raises the first number to the power of the second number.