-4
我在下面的用戶函數中看到一個名爲isdate的內置函數,當我檢查PHP文檔時,我沒有找到它。它是否存在,它是做什麼的;或者這只是一個錯字?是否有一個isdate PHP函數?
function mystery($a, $b, $c) {
$result = null;
if (strlen(trim($a)) == 0) {
$result = $c;
}
else {
if (strtolower(trim($b)) == "n") {
if (!is_numeric($a)) {
$result = $c;
}
else {
$result = trim($a);
}
}
else {
if (strtolower(trim($b)) == "d") {
if (!isdate($a)) {
$result = $c;
}
else {
$result = trim($a);
}
}
else {
$result = $a;
}
}
}
return($result);
}
那麼你的標題是錯誤的 - 那裏根本沒有循環...... – John3136
真約翰31316,這裏沒有循環。編輯。 –