You say you use PHP. You should keep in mind that PHP's built-in numeric type is machine dependent, and on x86 only 32 bits are used for integer values. Values โโthat are not integers or are outside the 32-bit range will be stored using floating point types that are not designed for the exact last digit for very large numbers.
Although there are libraries for PHP that allow you to carry large integers regardless of your architecture, it would probably be easier to just keep the id field as a string all the time. Since you will not do arithmetic on it, just treating it as an identifier, this should not be a big problem.
source share