May 24, 2012

Post: PHP vs. BIGINT vs. float conversion caveat

… another variant: s1=1125899906840000 s2=1125899906842625 As you can see float to string conversion is not portable across systems and PHP… large numbers stored as float (especially on 32-bit systems where 32-bit int overflow will implicitly convert to float) and getting strange… handling: it can be used to workaround signed vs. unsigned int issues; it helps with float formatting; always a saviour. UPDATE: as Jakub…