How does the bitwise operator differ between PHP and C#?

In PHP, the bitwise operator is represented by a single ampersand (&) for bitwise AND, a single vertical bar (|) for bitwise OR, a caret (^) for bitwise XOR, and a tilde (~) for bitwise NOT. In C#, the bitwise operators are the same symbols, but they are used slightly differently. For example, the AND operator in C# is represented by a double ampersand (&&) for logical AND and a single ampersand (&) for bitwise AND.

// PHP code snippet for bitwise AND operation
$firstNumber = 5;
$secondNumber = 3;

$result = $firstNumber & $secondNumber;

echo $result; // Outputs 1