Or the operator,& the XOR operators. Write the code always forget to write $, make oneself think write wrong
[PHP]
$i = 0;
$i =i|1;
echo "$i";//explain the difference between "double quotation marks and ' single quotation marks: double quotes will output values such as $i value 1, if the single quotation mark will directly output the string $i
echo "
";
echo $i |=2;
echo "
";
echo $i |=4;
echo "
";
echo $i |=8;
echo "
";
echo $i &1;
echo "
";
echo $i &2;
echo "
";
echo $i &4;
echo "
";
echo $i &8;
The output is:
[PHP]
1
3
11
1
2
0
8
At this point the $i&4 is less than 0
Author: Android_xiaoqi
http://www.bkjia.com/PHPjc/478074.html www.bkjia.com true http://www.bkjia.com/PHPjc/478074.html techarticle or operator, an XOR character. Write code always forget to write $, make oneself think write wrong [php] $i = 0; $i =i|1; echo $i;//Explain the difference between double quotation marks and single quotes: double quotes will output ...