{EDIT: Haha I always take the long way around...}
XX = month in digits
YY = day
ZZZZ can be any year in the past, present or future.
$tempdate = getdate (mktime (1, 1, 1, XX, YY, ZZZZ));
$tempdate = jddayofweek ($tempdate['wday'], 1);
echo $tempdate;
Ok, to extrapolate on PHPdev's post,
$tempdate = jddayofweek(date("w",strtotime("2002-01-01")));