PHP Date Time Tips - Part 2: Do you have a form that request date (such as birthday) from your user? How to check whether date input is valid or not?
You can use like this:
<?
// check date 29 feb 2007
// result: invalid
echo checkdate(29,2,2008) ? "Valid" : "Invalid";
?>