checking format date php code example
Example: php check if input is date
function isRealDate($date) {
if (false === strtotime($date)) {
return false;
}
list($year, $month, $day) = explode('-', $date);
return checkdate($month, $day, $year);
}