本篇文章為大家展示了如何在php中使用函數(shù)checkdate檢查日期,內(nèi)容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
php中可以使用checkdate函數(shù)校驗日期的正確性。
語法
integer checkdate (int %Month, int $Day, int $Year);
演示代碼
輸出結果如下
2/29/1900 is not valid 2/29/2000 is Valid 2/29/2100 is not valid 4/30/2008 is Valid 4/31/2008 is not valid
上述內(nèi)容就是如何在php中使用函數(shù)checkdate檢查日期,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注創(chuàng)新互聯(lián)行業(yè)資訊頻道。