Caught by Max Int

So, MAX_INT caught me out. Of course, I couldn’t work out why everything worked fine on my machine, but on another machine the exact same code was returning a negative number! I should have clued on when I was told that values over 2Gb caused problems. But why wasn’t the problem showing on my machine? It’s actually really simple, I’m using a 64bit machine so my “intval” function in PHP has a higher limit than on a 32bit machine. A quick google, a “bigintval” function and everything is back to normal!

Posted in News and tagged , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.