If you plan on using a 32-bit server or PHP binary over the next 25 years, I donโt think this will be a problem.
PHP is an interpreted language, so when you write $stamp = 1358425440; , itโs just a line of text that PHP is reading into, and then allocates X bytes of memory for storage according to how PHP was compiled. Therefore, if you upgrade your PHP binary to a version that supports 64-bit integers, you do not have to change your code. [Theoretically, at least. We all know how PHP likes to change common functions and condemn things.]
The only thing I see in the creation is storing integer values โโoutside of PHP, i.e. in mySQL. In this case, you just need to make sure that you save your timestamp as UNSIGNED INT, BIGINT or DATETIME.
SIGNED INTs will air Tue, January 19, 2038 03:14:07 GMT, but UNSIGNED INTs will last until Sun, February 7, 2106 06:28:15 GMT.
source share