This is a late answer. since there is no exact answer to this question, I propose this solution here.
You can do it this way
$date1 = strtotime("2007-02-20"); // your input $date2 = strtotime("today"); //today if($date1 < $date2) { echo " input date is in the past"; }
strtotime converts a string to the numeric value of timestamp unix.
Strikers Jun 25 '14 at 9:23 2014-06-25 09:23
source share