… int” integer type must be at least 64 bits in size. By now, most compilers support that part perfectly. However, designers of PHP 5…) bits and 640K should be enough for everybody. Long story short, it’s 2007 now but there’s no native 64-bit integer type in PHP. Let me remind that built-in “int” might be 64-bit, but then again it…
Post: PHP vs. BIGINT vs. float conversion caveat
… server ID into high bits of the ID. I had already written about the mess that 64-bit integers are in PHP. But if the numbers you use do not cover 64-bit range fully, floats might… is that PHP floats are in fact doubles, i.e. double-precision 64-bit numbers. They have 52 bits for mantissa, and integer values up…
Comment: PHP vs. BIGINT vs. float conversion caveat
… server ID into high bits of the ID. I had already written about the mess that 64-bit integers are in PHP. But if the numbers you use do not cover 64-bit range fully, floats might save the day. The trick is that PHP floats are in fact doubles, i.e. double-precision 64-bit…
Comment: Integers in PHP, running with scissors, and portability
[...] had already written about the mess that 64-bit integers are in PHP. But if the numbers you use do not cover 64-bit [...]
Comment: Integers in PHP, running with scissors, and portability
… problem in PHP if you try to have your code working on both 32 and 64 bit machines in parallel. In PHP, the variable size of the integer type is a “feature” (probably… 64 bit systems on 32 bit systems. Imagine using a mixed environment with 32 and 64 bit servers that need to share their data. Some PHP…
Comment: PHP vs. BIGINT vs. float conversion caveat
… section on 64-bit doubles (it’s a bit more trusted source than php.net/float by the way). Doubles have 52 bits allocated for mantissa, which means that 52-bit (actually 53-bit) INTEGER values MUST be stored without ANY precision loss. > PHP tries…
Comment: MySQL automatic data truncation can backfire
… the fact 64bit php returns a 64 bit signed integer which wont wrap at the same position as a 32bit signed integer. I’ve solved… is negative and then store all crc32 values as unsigned integers in mysql.

