- checkdate: documentation ( source)
<?php
$month=2;
$dt=30;
$year=2014;
if(!checkdate($month, $dt, $year)){
echo \DateTime::createFromFormat('m', $month)->format('F') . " is not a valid date";
} else {
$date = \DateTime::createFromFormat('d m Y', "$dt $month $year");
echo $date->format('jS F Y') . " will be a " . $date->format('l');
}