Posted by Jerry Stuckle on 11/03/42 11:41
fritz-bayer@web.de wrote:
> Hi,
>
> why does the php expression
>
> $result = 5543039447 & 2147483648;
>
> when executed evaluate to 0, whereas the perl expression
>
> $same = 5543039447 & 2147483648 ;
>
> evaluate to 2147483648 ???
>
> Fritz
>
Because Perl is using 64 bit integers and PHP is using 32 bit integers.
2147483648 is not a valid value in 32 bit arithmetic. The largest value
you can have is 2147483647.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|