Home >Backend Development >PHP Tutorial >Overview of types of PHP operators_PHP Tutorial
1) Assignment operator: =
2) Arithmetic operator: +, -, *, /, % (modulo)
3) Connection operator: ., no matter what the operand is, it is treated as String, and the result returns String
4) Combined assignment operators (Combined Assignment Operators): +=, *=, /=, -= , %=, .=
5) Automatically Incrementing and Decrementing:
(1) $variable+=1 ⇔$variable++; $variable-=1 ⇔$ variable-, like the c language, do other operations first, then ++ or -
(2) ++$variable, -$variable, do ++ or - first, then do other operations
6) Comparison operators:
= = (left side equals right side),! = (the left side is not equal to the right side),
= = = (the left side is equal to the right side, and the data type is the same),
>=, >, <, <=
7) Logic Operators: || or, && and, xor (when one and only one of the left and right sides is true, return true), !