PHP Operators

Bitwise

- -
& And
| Or (inclusive or)
^ Xor (exclusive or)
~ Not
<< Shift left
>> Shift right

Logical

- -
and And
or Or
xor Exclusive or
! Not
&& And
|| Or

Comparison

- -
== Equal
=== Identical
!= Not equal
<> Not equal
!== Not identical
< Less than
> Greater than
<= Less than or equal
>= Greater than or equal
<=> Less than/equal/greater than

Assignment

- -
a += b Same as a = a + b
a -= b Same as a = a – b
a *= b Same as a = a * b
a /= b Same as a = a / b
a %= b Same as a = a % b

Arithmetic

- -
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo
** Exponentiation
Comments