Documentation is your friend. &&
and ||
are logical operators. You can read more about them here.
I highly suggest you read about operator precedence and learn why &&
vs and
and ||
vs or
are different. Learn when one is more appropriate than the other. Essentially =
has higher precedence than and
and or
, but lower precedence than &&
and ||
. Example #1 of the logical operators section does a good job of explaining this.
With other languages you just have &&
and ||
, not and
and or
.
&
and |
are bitwise operators. You can read about them here.
Typical usage for bitwise operators are flags. One common use is PHP's error_reporting setting.