Re: Bitwise operators
| From: | cron at odi dot com dot br | Date: | Mon, 26 Sep 2005 16:43:21 +0000 |
| Subject: | Re: Bitwise operators | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223206@lists.php.net to get a copy of this message | ||
I tested; I don't want to waste peoples time. Rewriting the question:
$a = 4;
$b = 3;
$c = $a << $b;
$d = $a >> $b;
echo "c = " . $c . "<br>";
echo "d = " . $d . "<br>";
this outputs:
c = 32
d = 0
The question is why?
Angelo
----- Original Message -----
From: "Chris W. Parker" <cparker@swatgear.com>
To: <php-general@lists.php.net>
Sent: Monday, September 26, 2005 1:28 PM
Subject: RE: [PHP] Bitwise operators
cron@odi.com.br <mailto:cron@odi.com.br>
on Monday, September 26, 2005 9:18 AM said:
> So i ask what this output?
>
> $a = 4;
> $b = 3;
>
> echo $a << $b;
> echo $a >> $b;
You just spent 3-5 minutes writing an email and now almost 10 minutes
waiting for a reply to something that would have taken you 2 minutes to
test on your own.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php