我有变量$EDate
,我使用了带有不同值的变量的 strtotime 函数,结果如下:
$EDate = 10-21-2013; echo "strtotime($EDate)"; the result = nothing and the type is boolean
$EDate = 09-02-2013; echo "strtotime($EDate)"; the result = 1360386000 and the type is integer
$EDate = 09-30-2013; echo "strtotime($EDate)"; the result = nothing and the type is boolean
$EDate = 09-30-2013; echo "strtotime($EDate)"; the result = nothing and the type is boolean
$EDate = 07-02-2014; echo "strtotime($EDate)"; the result = 1391749200 and the type is integer
$EDate = 10-12-2014; echo "strtotime($EDate)"; the result = 1418187600 and the type is integer
任何人都可以解释这一点以及如何避免布尔结果吗?