亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

php date validation function

checkdate can determine whether an output date is valid.

In actual work, we often need to detect data validation commonly used for user submission forms.

For example: Verify whether the time entered by the user is correct.

The syntax format of the function is as follows:

bool checkdate (int $month, int $day, int $year)

In the following example, we You can use a code to conduct experiments and write a real example. Try to see if there is February 29, 2011.

Return true if it is a valid time, return false if it is not a valid time.

<?php
var_dump(checkdate(12, 31, 2018));
var_dump(checkdate(2, 29, 2011));
?>

Output result:

bool(true)
bool(false)


Continuing Learning
||
<?php var_dump(checkdate(12, 31, 2018)); var_dump(checkdate(2, 29, 2011)); ?>
submitReset Code