planetsim, why is it so funny to validate a date e.g. from user input (thinking about credit card expiration date or something)?
I'd use checkdate() if I only wanted to validate, and mktime() is helpful if you wanted to set e.g. 2003-01-32 to 2003-02-01, but setting it back to the last day of the given month?
probably a loop where checkdate() is called until it returns true while the day is decreased, like:
$day=35;
$month=1;
$year=2003;
while(!checkdate($month, $day, $year)){
$day--;
}