PHP Operators
- Arithmetic
- Assignment
- Comparison
- Increment / Decrement
- Logical
- String
Arithmetic
5 + 3 = 8
5 - 3 = 2
5 * 3 = 15
5 / 3 = 1.6666666666667
5 % 3 = 2
5 ** 3 = 125
Assignment
5 = 3 = 3
3
+= 3 = 66 -= 3 = 3
3 *= 3 = 9
9 /= 3 = 3
Comparison
This is true.
Increment / Decrement
1. 12. 63.1. 24. 5 Logical
true that both a and b are truetrue that both a and b are truetrue that a or b is truetrue that a or b is true String
$ a . $ b : String concatenation (joining)
HelloWorld$ a .= $ b : Appends $ b onto $ a
HelloWorld