Posted by Chung Leong on 05/31/06 15:52
Skeleton wrote:
> My PHP 5.1.2 is on Windows. So the problem is about the Operating
> Systems.
>
> David Haynes wrote:
> > Be careful of your base assumptions. php 5.1.2 on Linux produces
> > -2147483647 as well.
> >
> > -david-
No, it's difference is in the compiler. The operation you describe
causes a double-to-long-integer conversion overflow. Gcc probably
throws in a check which sets the value to the integer boundary whereas
MS Visual C just lets it wrap around.
Navigation:
[Reply to this message]
|