<?php
echo "testing bit operations\n";
$flag = 0;
echo "To start, the setting will be off: $flag\n";
echo "Now we will see if any of the bits are set.\n";
echo "1: ". $flag & 1 == 1 ."\n";
echo "2: ". $flag & 2 == 2 ."\n";
echo "4: ". $flag & 4 == 4 ."\n";
echo "test";
testing bit operations
To start, the setting will be off: 0
Now we will see if any of the bits are set.
Warning: A non-numeric value encountered in /in/RUGIR on line 6
1
Warning: A non-numeric value encountered in /in/RUGIR on line 7
0
Warning: A non-numeric value encountered in /in/RUGIR on line 8
0test
testing bit operations
To start, the setting will be off: 0
Now we will see if any of the bits are set.
Notice: A non well formed numeric value encountered in /in/RUGIR on line 6
1
Notice: A non well formed numeric value encountered in /in/RUGIR on line 7
0
Notice: A non well formed numeric value encountered in /in/RUGIR on line 8
0test