Precedence and bitmask operations
Solution 1:
You are actually doing this:
var_dump(0b10 & (0b01 == 0));
var_dump(0b10 & (0b01 != 0));
Try:
var_dump((0b10 & 0b01) == 0);
var_dump((0b10 & 0b01) != 0);
You are actually doing this:
var_dump(0b10 & (0b01 == 0));
var_dump(0b10 & (0b01 != 0));
Try:
var_dump((0b10 & 0b01) == 0);
var_dump((0b10 & 0b01) != 0);