Re: Bitwise operators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/26/05, cron@xxxxxxxxxx <cron@xxxxxxxxxx> wrote:
> From php manual:
>
> $a << $b Shift leftShift the bits of $a $b steps to the left (each step
> means "multiply by two")
> $a >> $b Shift rightShift the bits of $a $b steps to the right (each step
> means "divide by two")
>
>
> So i ask what this output?
>
> $a = 4;
> $b = 3;
>
> echo  $a << $b;

32

> echo  $a >> $b;

0

So your program will output '320'.

What was the problem again?

  -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux