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: