A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9 Ω


PHP Zuweisungsoperatoren


Liste


Basiswissen


In der Programmiersprache PHP gibt es verschiedene Operatoren, die einer Variablen einen Wert zuweisen. Diese sind hier kurz aufgelistet.

=


Simple assignment operator, Assigns values from right side operands to left side operand. Example: C = A + B will assign value of A + B into C

+=


Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand. Example: C += A is equivalent to C = C + A


Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand. Example: C -= A is equivalent to C = C - A

*=


Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand. Example: C *= A is equivalent to C = C * A

/=


Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand. Example: C /= A is equivalent to C = C / A

%=


Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand. Example: C %= A is equivalent to C = C % A