note 14898 deleted from language.types.type-juggling by jeroen
| From: | jeroen@php.net | Date: | Sun, 02 Sep 2001 18:31:22 +0000 |
| Subject: | note 14898 deleted from language.types.type-juggling by jeroen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17541@lists.php.net to get a copy of this message | ||
carl.seleborg at ifrance.com on 26-Jul-2001 05:10 said:
> It seems that sometimes, you need a little type juggling when doing bitwise
> operations. Here's what happened to me (this was not the exact code, but the
> values are the same) :
>
> $a = 7;
> $b = 256;
>
> Later on, I did ($a & $b) with those exact values and got a result of 7, which
> is mathematically wrong.
Under PHP 4.05 this seems to work exactly as expected, no type casting appears to be required.