PHP Operators

Below is a list of commonly used operators in PHP.

Assignment Operators

Operator Use
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
++ Increment
-- Decrement
Sponsored Links

General Operators

Operator Use
\b Backspace
\t Horizontal tab
\n Line feed
\v Vertical tab
\f Form teed
\r Carriage return
\" Double quotes
\' Single quotes
\\ Backslash
. Concatenation

Comparison Operators

 Operator Use
== Is equal to
=== Exactly identical
!= Not equal to
!== Is not identical
< Is less than
> Is greater than
<= Less than but equal to
>= Greater than but equal to

Logical Operators

Operator Use
&& And
| | Or
! Not