Home >Backend Development >PHP Tutorial >Overview of types of PHP operators_PHP Tutorial

Overview of types of PHP operators_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:30:461068browse

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), !


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446256.htmlTechArticle1) Assignment operator: = 2) Arithmetic operator: +, -, *, /, % (take Modulo) 3) Connection operator: ., no matter what the operand is, it is treated as String, and the result returns String 4) Total assignment operator...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn