The arithmetic operators, same as in other programing langauges, are the most commonly used group of operators in the PHP. We can say that all the mathematical operations performed in PHP are represented by arithmetic operators.
List of arithmetic operators in PHP
Name |
Operator |
Example |
Result |
---|---|---|---|
Addition |
+ |
$a+$b |
Sum |
Subtraction |
- |
$a-$b |
Difference |
Multiplication |
* |
$a*$b |
Product |
Division |
/ |
$a/$b |
Quotient |
Modulus |
% |
$a%$b |
Remainder |
Exponentiation |
** |
$a**$b |
Exponential rise of $a to the power of $b |
Comments
No comments have been made yet.
Please login to leave a comment. Login now