Anonymous user
Bitwise operations: Difference between revisions
→{{header|PHP}}
Line 336:
}</perl>
=={{header|PHP}}==
<php>function bitwise($a, $b)
{
<php>echo '$a << $b: ', $a << $b, "\n"; // left shift ▼
echo '$a
echo '$a OR $b: ', $a | $b, "\n";
echo '$a XOR $b: ', $a ^ $b, "\n";
echo 'NOT $a: ', ~$a, "\n";
echo '$a >> $b: ', $a >> $b, "\n"; // arithmetic right shift
}</php>
=={{header|Pop11}}==
|