Posted by d on 09/30/60 11:41
<fritz-bayer@web.de> wrote in message
news:1141407160.003705.72180@i40g2000cwc.googlegroups.com...
> Hi,
>
> why does the php expression
>
> $result = 5543039447 & 2147483648;
>
> when executed evaluate to 0, whereas the perl expression
>
> $same = 5543039447 & 2147483648 ;
>
> evaluate to 2147483648 ???
Because perl is screwed?
5543039447 = 101001010011001000001000111010111
and
2147483648 = 010000000000000000000000000000000
As you can see, if you and both of those, you get zero. It seems PHP is
right on this one.
> Fritz
>
dave
[Back to original message]
|