1. php无法区分switch 0 ‘0’, 最好不要 $a = 0;switch($a) 这种 , 替代 switch(true) { case $a == '0' : break;}