Home  >  Article  >  Backend Development  >  What are the assignment operators in php?

What are the assignment operators in php?

(*-*)浩
(*-*)浩Original
2019-09-06 13:46:109112browse

What are the assignment operators in php?

PHP assignment operator (Recommended learning: PHP programming from entry to proficiency)

In PHP, basic The assignment operator is "=". It means that the left operand is set to the value of the right-hand expression. In other words, the value of "$x = 5" is 5

##x=yx=y The left operand is set to the value of the right-hand expression x = yx = x yplusx -= yx = x - yMinusx *= yx = x * yMultiply x /= yx = x / yexcept x %= yx = x % y modulo (remainder of division)a .= ba = a . bConcatenate two strings# #The following examples demonstrate different results obtained by using different assignment operators:
operator
is equivalent Described in






















The above is the detailed content of What are the assignment operators in php?. For more information, please follow other related articles on the PHP Chinese website!

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