What are the potential pitfalls of using a single pipe character (|) instead of double pipe characters (||) in PHP conditional statements?

Using a single pipe character (|) instead of double pipe characters (||) in PHP conditional statements can lead to unexpected behavior because the single pipe is a bitwise operator, while the double pipe is a logical OR operator. To fix this issue, always use double pipe characters (||) when performing logical OR operations in PHP conditional statements.

// Incorrect usage of single pipe character
if ($x == 1 | $y == 2) {
    // Code block
}

// Corrected usage of double pipe characters
if ($x == 1 || $y == 2) {
    // Code block
}