Difference between & &&
| From: | James Taylor | Date: | Sat, 08 Mar 2003 04:54:06 +0000 |
| Subject: | Difference between & && | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138719@lists.php.net to get a copy of this message | ||
Ok, this may have already been posted to the list already, but the
archives don't seem to like the & and && characters.
I'm running into some code that looks like this:
<snip>
Define('INPUT', 2);
<snip>
if($search->level & INPUT) $tmp.= $search->input();
Ok, what's the & mean?
As far as I could tell from the very little documentation I was able to
scrape up on google, & is a bit-by-bit operator. Thus, if either INPUT
or $search->level, we get TRUE... If that's the case, what's the point
of using it instead of || ?
Or, do I just totally not understand the point of this. Thanks