Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199807

Re: [PHP3] bit shifting From: Vincent Kurt Stoessel (relay <email protected>)
Date: 07/02/98

Forgive my stupid question,
but what would be a pratical use of
bit shifting?

Stig S. Bakken wrote:
>
> [Lorenzo Huerta <lorenzo <email protected>>]
> |
> | are there any fnctions in php3 that allow you to do bit shifting, like shr
> | and shl in php2?
>
> PHP has bit shifting operators just like C:
>
> $a = $a << 2;
> $b = $b >> 4;
> $a <<= 2;
> $b >>= 4;
>
> - Stig
> --
> Stig S. Bakken Guardian Networks AS
> mailto:ssb <email protected> Trondheim, Norway
> http://www.pvv.org/~ssb/ http://www.guardian.no/
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive: http://www.tryc.on.ca/php3.html

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive: http://www.tryc.on.ca/php3.html