This section describes what is an operation - a process that takes one or two operands and returns a result based on certain processing rule represented by the operator.
What Is an Operation?
An operation is a process that takes one or two operands and returns a result based on certain processing rule
represented by the operator.
PHP supports most types of operations used in other programming languages:
1. Bitwise Operations: and ($a & $b), or ($a | $b), xor ($a ^ $b), not (~ $a), shift left ($a << $s),
and shift right ($a >> $s).
4. Comparison Operations: equal ($a == $b), identical ($a === $b), not equal ($a != $b, $a <> $b),
not identical ($a !== $b), less than ($a < $b), greater than ($a > $b), less than or equal ($a <= $b),
and greater than or equal ($a >= $b).
5. Logical Operations: and ($a and $b, $a && $b), or ($a or $b, $a || $b), xor ($a xor $b), and not (!$a).
6. String Operation: concatenation ($a . %b).
7. Assignment Operations: assignment ($a = %b), addition with assignment ($a += $b), subtraction with assignment ($a -= $b),
multiplication with assignment ($a *= $b), division with assignment ($a /= $b), modulus with assignment ($a %= $b),
and concatenation with assignment ($a .= %b).
To help us understand different types of operations, I wrote the following PHP script, OperationTest.php: