Or operator. When writing code, I always forget to write $. I thought it was wrong [php] $ i0; $ ii | 1; echo & quot; $ I & quot ;; // describe the difference between double quotation marks & quot; and & amp; #39; & amp; #39; single quotation marks: double quotation marks will output the value, for example, $ I value 1. if you use single quotation marks, it will directly output characters...
Or operator. I always forget to write $ when writing code. I thought I was wrong.
[Php]
$ I = 0;
$ I = I | 1;
Echo "$ I"; // note "" The difference between double quotation marks and ''single quotation marks: double quotation marks will output values such as $ I value 1, if you use single quotes, the string $ I will be output directly.
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;
Output result:
[Php]
1
3
11
1
2
0
8
At this time, $ I & 4 is less than 0
Author: Android_Xiaoqi