Home  >  Article  >  Backend Development  >  What does = mean in PHP?

What does = mean in PHP?

烟雨青岚
烟雨青岚Original
2020-06-17 09:59:083370browse

What does = mean in PHP?

#What does = mean in PHP?

#The basic assignment operator in PHP is "=". This means that the right-hand assignment expression sets the value of the left-hand operand.

Example:

<?php 
$x=17; 
echo $x; // 输出 17$y=17; 
$y += 8;
echo $y; // 输出 25$z=17;
$z -= 8;
echo $z; // 输出 9$i=17;
$i *= 8;
echo $i; // 输出 136$j=17;
$j /= 8;
echo $j; // 输出 2.125$k=17;
$k %= 8;
echo $k; // 输出 1?>

Recommended tutorial: "php tutorial"

The above is the detailed content of What does = mean 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