What is the syntax for using the OR operator in a regular expression pattern in PHP?

When using the OR operator in a regular expression pattern in PHP, you can use the pipe symbol (|) to specify alternatives. This allows you to match any of the specified alternatives within the pattern. For example, if you want to match either "apple" or "banana", you can use the pattern "/apple|banana/".

$pattern = "/apple|banana/";
$string = "I like apples and bananas.";
if (preg_match($pattern, $string)) {
    echo "Match found!";
} else {
    echo "No match found.";
}