We can perform various arithmetic operations like addition (+), subtraction (-), multiplication (*), division (/) and modulus (%).
$variable (or a constant value) operator $variable (or a constant value).
Here is the code that demonstrates various arithmetic operations.
We use ‘=’ to assign.
$variable = <value>
The example code :
Concatenation : We use the dot (.) operator to achieve concatenation.
$variable (or a string).$variable (or a string)
1. Pre-increment (++$variable).
2. Post-increment ($variable++).
3. Pre-decrement (–$variable).
4. Post-decrement ($variable–).
1. Equal (==) : Data types are not considered, just the values are considered.
2. Identical (===) : Data types are considered.
3. Not equal (!= ).
4. Not identical (!==).
5. Less than (<).
6. Less than or equal (<=).
7. Greater than (>).
8. Greater than or equal (>=).
1. AND ($variable and $variable / $variable &&…
View original post 42 more words