'strtotime returns false for large dates php5.6

In my php5.6 the output of the following code is false

$test =  strtotime("2050-07-31 00:00:00.000000");

when running this code using the online compiler attached below it returns 2542838400

https://www.w3schools.com/php/phptryit.asp?filename=tryphp_compiler

What would cause this code to be returning false for us and how would we go about fixing this?



Solution 1:[1]

In addition to many other reasons why strtotime returns false, there can be another one - you have 32-bit computing system.

Which means that values that are greater than 2 147 483 647 (and 2 542 838 400 is) cannot be stored in a variable.

So, you have to check your architecture and move to 64-bit computing system.

Solution 2:[2]

define symbol __RAM_func_start__ = 0;  //ITC start
define symbol __RAM_func_end__ = 0x10000;//start + 64k
define region RAM_func_region = mem:[from __RAM_func_start__ to __RAM_func_end__];

define block RamCode {section .textrw};
place in RAM_func_region { block RamCode };
initialize by copy {readwrite};

And mark functions __ramfunc for example

__ramfunc int main(void)
{
    /* ..... */
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 u_mulder
Solution 2 0___________