var_dump(false and false || true);
// result: bool(false)
(false and false || true) returns false as expected.
var_dump(false and false or true);
// result: bool(true)
but (false and false or true) returns true. I have no logical explanation why this is happening.