I'm web developer and I put here some of my experiences.
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31 echo "There was $num days in August 2003";