내가 다음 코드 snipplet를 한 경우 및 단락 회로 :목록(), 평가
$active_from = '31-12-2009';
if(list($day, $month, $year) = explode('-', $active_from)
&& !checkdate($month, $day, $year)) {
echo 'test';
}
왜 내가 정의되지 않은 변수 에러가 발생합니까?
list($day, $month, $year) = explode('-', $active_from)
은 true
이므로 list()
이 평가됩니까? 아닙니다. 변수가 정의되어야한다고 생각합니다. 내가 무엇을 감독합니까?
if((list($day, $month, $year) = explode('-', $active_from)) && checkdate($month, $day, $year)) {
하지만 난 정말 왜 :-)
을 이해하지 않습니다
이 같은 내 의견 않고 오류가 발생하지 않습니다 :이 오류를 제기하지
$active_from = '31-12-2009';
list($day, $month, $year) = explode('-', $active_from);
if(checkdate($month, $day, $year)) {
echo 'test';
}
을 설명해 주셔서 감사합니다.
여기에 오류가 없습니다. http://codepad.org/33BV3EsO –