You are here: Re: [PHP] Bitwise operators « PHP « IT news, forums, messages
Re: [PHP] Bitwise operators

Posted by Robin Vickery on 09/26/05 19:37

On 9/26/05, cron@odi.com.br <cron@odi.com.br> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация