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

Posted by cron on 09/26/05 19:43

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

 

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

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