PHP basic syntax arithmetic operations

Arithmetic operators are the vast majority of knowledge we have learned in elementary school:

 
##* Multiply sign, multiply by $x * $y / division sign, divided by $x / $y % Remainder is also called modulus and modulus $x % $y
Symbol Explanation Example
+ plus sign #$x + $y
- Minus sign $x - $y
Similar to what we have learned in mathematics, there is also a priority: multiplication and division first, then addition and subtraction. If you want to change the priority more explicitly, use () [parentheses] to enclose the value you want to take precedence.


Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!