Operators and Operands:
Math expressions in PHP are made up of operators and operands. Basic math like adding, subtracting, multiplying and dividing can be done using mathematical operators. We also use comparison operators in equations to represent greater than (>) less than (<) and equal to (=).
There are several ways to round a number in PHP. One way is to simply round the number in the traditional way (anything .5 or over goes up, under goes down.) You can also use ceil to round all numbers up, or use floor to round all numbers down.
One commonly used constant in geometry is pi (?). There are several ways to use pi and variations of pi in PHP. Some other useful geometry PHP functions are sine, cosine, and tangent.
Roots and Exponents:
You can raise a number to any power in PHP using the pow () function. Similarly you can find its root. To find the square root you would use sqrt ().
The absolute value of a number, is the distance a number is from 0, and is always a positive number. The absolute value function in PHP produces this for us.
Numbers are formatted differently in different parts of the world. In the US, it is common to format using commas and periods such as: 1,000,000.00 In PHP we can set our numbers to format however we want, to make them the most useful for us.