Home »
PHP
» PHP operators are characters
Artithmetic Operators
Operator | Description |
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus (remainder of a division) |
++ | Increment |
-- | Decrement |
Assignment Operator
Operator | Description |
= | Assign |
+= | Increments, then assigns |
+= | Decrements, then assigns |
*= | Multiplies, then assigns |
+= | Increments, then assigns |
/= | Divides, then assigns |
%= | Modulus, then assigns |
Comparison Operators
Operator | Description |
== | Is equal to |
!= | Is not equal to |
> | Greater than |
>= | Greater than or equal to |
< | Less than |
<= | Less than or equal to |
Logical Operators
Operator | Description |
&& | And operator. Performs a logical
conjunction on two expressions (if both expressions evaluate to True,
result is True. If either expression evaluates to False, result is
False) |
|| | Or operator. Performs a logical disjunction on two expressions (if either or both expressions evaluate to True, result is True). |
! | Not operator. Performs logical negation on an expression. |
Concatenation Operators
Operator | Description |
. | Concatenate (join two strings together) |