0

I am just checking add years in php.

When I tried adding more than 16 years in current date, it is showing error.

$a1 = "2021-04-25 14:54:21";
$expirydate = date('Y-m-d 23:59:59', strtotime($a1. "+16 Years")); // Less than 16 years working
  echo $expirydate;  

SHOWING 2037-04-25 23:59:59 And it is right.

BUT

$a1 = "2021-04-25 14:54:21";
$expirydate = date('Y-m-d 23:59:59', strtotime($a1. "+17 Years")); // Adding More than 16 Years showing error
  echo $expirydate; 

SHOWING 1970-01-01 23:59:59

Is there any max limit in php ?

0 Answers0