June 19, 2013

Post: PHP vs. BIGINT vs. float conversion caveat

…-bit identifiers are not enough and you have to use BIGINT 64-bit ids; e.g. if you are encoding additional…-bit range fully, floats might save the day. The trick is that PHP floats are in fact doubles, i.e. double-precision 64-bit… another variant: s1=1125899906840000 s2=1125899906842625 As you can see float to string conversion is not portable across systems and PHP…

Comment: PHP vs. BIGINT vs. float conversion caveat

… Blog wrote an interesting post today on PHP vs. BIGINT vs. float conversion caveatHere’s a quick excerpt Sometimes you need to…-bit identifiers are not enough and you have to use BIGINT 64-bit ids; e.g. if you are encoding additional…-bit range fully, floats might save the day. The trick is that PHP floats are in fact doubles, i.e. double-precision 64-bit…