Definition
The checkdate() function validates a Gregorian date.
Syntax
checkdate(month, day, year)
Parameters
Parameter | Description |
---|---|
month |
Required. Specifies the month as a number between 1 and 12. |
day |
Required. Specifies the day as a number between 1 and 31. |
year |
Required. Specifies the year as a number between 1 and 32767. |
Example
<?php
var_dump(checkdate(2, 29, 2040));