cal_days_in_month

It returns the number of days in a month for a given year and calendar

Example

<?php
$number = cal_days_in_month(CAL_GREGORIAN, 2, 1984);
echo  $number.” days”;
?>

Output

29 days