For Addition use +
Eg. $a + $b
For Subtraction use –
Eg. $a – $b
For Multiplication use *
Eg. $a * $b
For Division use /
Eg. $a / $b
For getting remainder of division (modulus)
Eg. $a % $b
For getting results of powers (exponentiation)
Eg. $a ** $b
COMPARISON
To check if values of variables are same
Eg. $a == $b
To check if values along with data types of those variables are same
Eg. $a == $b
To check if values are not same
Eg. $a <> $b
The above can also be used as
Eg. $a != $b
To check if value is greater than
Eg. $a > $b
To check if value is greater than or equal to
Eg. $a >= $b
To check if value is less than
Eg. $a < $b
To check if value is less than or equal to
Eg. $a <= $b
Leave a comment