What are the potential pitfalls of using both AND and OR in PHP conditional statements?

Using both AND and OR in PHP conditional statements can lead to confusion and unexpected results due to operator precedence. To avoid this issue, it's recommended to use parentheses to explicitly define the order of operations in complex conditions.

// Example of using parentheses to clarify the condition
if (($condition1 && $condition2) || $condition3) {
    // Code block
}