Order of mathematical operations in PHP

By default mathematical operations in PHP follow rules of the same priorities as in regular math. It means that PEMDAS principle is in use. PEMDAS stands for parentheses, exponents, multiplication, division, addition, subtraction. It is important to note that multiplication and division is done from left to right, there is no priority of multiplication over division, same principle applies to addition and subtraction.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator