<分区>
Possible Duplicate:
Reference - What does this symbol mean in PHP?
这条线是做什么的?
$theVal = ((($theR << 8) | $theG) << 8) | $theB;
<<
是做什么的和 |
做什么?
<分区>
Possible Duplicate:
Reference - What does this symbol mean in PHP?
这条线是做什么的?
$theVal = ((($theR << 8) | $theG) << 8) | $theB;
<<
是做什么的和 |
做什么?
最佳答案
这些是位运算符,允许对整数中的特定位进行评估和操作。
$一个 | $b Or 设置在 $a 或 $b 中的位。
$a << $b Shift left 将$a $b步的位向左移动(每一步表示“乘以二”)
$a >> $b Shift right 将$a $b步的位向右移动(每一步表示“除以二”)
关于php - 双小于号和管道运算符是做什么的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10920379/