When should I use a bitwise operator?
问题 I read the following Stack Overflow questions, and I understand the differences between bitwise and logical. Difference between & and && in PHP Reference - What does this symbol mean in PHP? However, none of them explains when I should use bitwise or logical. When should I use bitwise operators rather than logical ones and vice versa? In which situation do I need to compare bit by bit? I am not asking about the differences, but I am asking the situation when you need to use bitwise operators.