RE: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread John Crenshaw
> As for minimal ranges, I think they are quite outdated - there are not > many 16-bit systems around anymore, so most ints would be 32-bit by now. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 Yeah, the choice to make long longer

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Stas Malyshev
Hi! This is not exactly correct. I think what you meant to say, is "long isn't the same size as a pointer on Windows". I actually meant to say it's no longer than int, which makes this type kind of pointless currently. Both behaviors conform C standards and I'm sure there were reasons why Wi

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Pierre Joye
On Fri, Jun 10, 2011 at 7:08 PM, John Crenshaw wrote: > >> ITYM PHP uses "long" which unfortunately isn't long on windows. >> >> -- >> Stanislav Malyshev, Software Architect >> SugarCRM: http://www.sugarcrm.com/ >> (408)454-6900 ext. 227 > > This is not exactly correct. I think what you meant to s

RE: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread John Crenshaw
> ITYM PHP uses "long" which unfortunately isn't long on windows. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 This is not exactly correct. I think what you meant to say, is "long isn't the same size as a pointer on Windows". Lo

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Johannes Schlüter
On Fri, 2011-06-10 at 17:52 +0100, Derick Rethans wrote: > Yes, indeed. That was a typo. The original point still stands though. > And IMO, this should be fixed in the Windows port so that on 64 bit > processors, the PHP "int" type (the C "long" type) is actually 64 bits, > just like almost any

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Derick Rethans
On Fri, 10 Jun 2011, Stas Malyshev wrote: > > I agree that that should be the same. But sadly, Windows uses a > > different integer size model than almost everything else modern. > > Where Linux and Mac and other unices use 8 bytes for an "int", > > Windows uses 4 bytes > > (http://en.wikipedi

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Stas Malyshev
Hi! I agree that that should be the same. But sadly, Windows uses a different integer size model than almost everything else modern. Where Linux and Mac and other unices use 8 bytes for an "int", Windows uses 4 bytes (http://en.wikipedia.org/wiki/LP64#Specific_C-language_data_models). Because P

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Hannes Landeholm
On 10 June 2011 16:54, Pierre Joye wrote: > The sad part is not that windows uses a consistent type size across > architecture but that linux and gcc considers that a type could be > whatever the architecture uses. Hence why stdint.h was introduced and > should be used instead of the long/int. >

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Pierre Joye
hi, On Fri, Jun 10, 2011 at 4:47 PM, Derick Rethans wrote: > On Fri, 10 Jun 2011, Hannes Landeholm wrote: > >> What are the reasoning behind this? I think the PHP integer size >> should be changed to always be 64 bit - independent of the platform. I >> have stumbled on this annoying inconsistency

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Derick Rethans
On Fri, 10 Jun 2011, Richard Riley wrote: > Hannes Landeholm writes: > > *snip button* > > Could anyone suggest why the php groups in particular mark post mime types > incorrectly in certain instances? I am seeing > > , > | Content-Type: multipart/alternative; boundary=20cf301d426efd027f04

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Derick Rethans
On Fri, 10 Jun 2011, Hannes Landeholm wrote: > What are the reasoning behind this? I think the PHP integer size > should be changed to always be 64 bit - independent of the platform. I > have stumbled on this annoying inconsistency several times the last > month. I agree that that should be th

Re: [PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Richard Riley
Hannes Landeholm writes: *snip button* Could anyone suggest why the php groups in particular mark post mime types incorrectly in certain instances? I am seeing , | Content-Type: multipart/alternative; boundary=20cf301d426efd027f04a55b14cc ` when there is only a single text part. Its

[PHP-DEV] 32 bit / 64 bit integer confusion

2011-06-10 Thread Hannes Landeholm
Greetings. One very important feature of PHP is its interoperability. This allows my colleagues to work in both Windows, Ubuntu and OSX - developing the same application. Details like the fact that PHP will replace forward slash with backward slash automatically in windows is a great example of th