I have two variable
$date1 = '2019-02-07';
$date2 = '1545762600';
Then how to check which variable is in timestamp and need to convert to normal format i.e Y-m-d.
$date2
is not fixed with timestamp as it will also return '2019-02-07'
sometime so, we can not use date('Y-m-d', strtotime($date1));
and date('Y-m-d', strtotime($date2));
without check that given date is in timestamp or not.