PHP exclusive or operator. Or operator. When writing code, I always forget to write $. I thought it was wrong to write [php] $ i0; $ ii | 1; echo $ I;, which indicates the difference between double quotation marks and single quotation marks: double quotation marks are output or operators. 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
Bytes. When writing code, I always forget to write $. I thought I was wrong [php] $ I = 0; $ I = I | 1; echo $ I; // the difference between double quotation marks and single quotation marks: double quotation marks are output...