Re: Re: Difference between & &&

From: Date: Sat, 08 Mar 2003 07:51:21 +0000
Subject: Re: Re: Difference between & &&
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138733@lists.php.net to get a copy of this message
It says " We connected successfully!" for me. Is this the local copy? It's kind of hard to pinpoint the problem with no code... Karl James wrote:
Leif Is there a chance you can help me with my parsing problem I have file where im trying to upload to a server to check To make sure I can get a connection to my mysql database When I try to view the php file locally on my machine I have no worries But when I upload to the web I get a blank white page This is the url http://66.12.3.67/webdb/webdb13/assignment_1.php Any advise would be helpful, I am struggling Thanks ultimatefootballleague.com/index.php karl.james@verizon.net -----Original Message----- From: Leif K-Brooks [mailto:eurleif@buyer-brokerage.com] Sent: Saturday, March 08, 2003 2:20 AM To: James Taylor Cc: php-general@lists.php.net Subject: Re: [PHP] Re: Difference between & && Not sure where you can read more, but let me try to explain it. The bitwise operators operate on a binary representation of a number. 4 is 100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator sets bits set in either number. 5 & 4 results in 4, because the & operator only sets bits set in both. As for 4 & 4, the same bits are set in both 4 and 4 (since they're the same number! :)), so it results in the same number. James Taylor wrote:
Where can I read more about this? I'm not sure that I understand why 4
& 4 == 4. -----Original Message----- From: Greg Beaver [mailto:greg@chiaraquartet.net] Sent: Friday, March 07, 2003 11:04 PM To: php-general@lists.php.net; James Taylor Subject: [PHP] Re: Difference between & && Hi James, & is a bit-wise AND. && is a logical AND. The bitwise AND will return a number, the logical AND will return true or false boolean values. It's a subtle distinction, but important. 4 & 4 == 4 4 && 4 == true
==
1 Regards, Greg -- phpDocumentor http://www.phpdoc.org James Taylor wrote:
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
     
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#138733) next »