在开始之前,我们先看一下一个令人不爽的写法if ($k == 0) { // do something } else if ($k == 1) { // do somethings } else if ($k == 2) { //&nbs...