Re: [PHP-DEV] casting doubles to ints

2009-02-05 Thread Iain Lewis
5.2 32bit situation at the moment (int)(PHP_INT_MAX +1) < (int)(PHP_INT_MAX +100) < (int)(PHP_INT_MAX + 1000) This does seem pretty sensible. I'm more worried about the 64bit case where: (int)(PHP_INT_MAX +1) == (int)(PHP_INT_MAX +100) < (int)(PHP_INT_MAX + 1000) It would be nice for the 64 bi

Re: [PHP-DEV] casting doubles to ints

2009-02-05 Thread Iain Lewis
On windows x86_64, PHP_INT_MAX is 2147483647. This is because in the underlying c-code, a long is 32 bit. However, linux on x86_64 uses a 64bit long so PHP_INT_MAX is going to be 9223372036854775807. Kenan R Sulayman wrote: Hi Lain! As much as I did understand, this might be a pretty good i

Re: [PHP-DEV] casting doubles to ints

2009-02-04 Thread Kenan R Sulayman
Hi Lain! As much as I did understand, this might be a pretty good idea. Anyhow, you want to make this variable to be constant? I think, this might break some calculations.- And another question: Does anyone knows, why PHP is showing 2147483647 as PHP_INT_MAX ? *truly, I'm running x64* Thanks, -

Re: [PHP-DEV] casting doubles to ints

2009-02-04 Thread Matt Wilmas
Hi Iain, (Yes, this subject has me sending a message to the list again instead of lurking, and I should be back with some internals stuff again soon, hehe. :^)) - Original Message - From: "Iain Lewis" Sent: Wednesday, February 04, 2009 Subject: [PHP-DEV] casting doubles to ints > Hello a