switchCase(85, function ($switchCase) { $switchCase->add(function ($it) { return $it >= 90 and $it < 100; }, function () { return "优秀"; }); $switchCase->add(function ($it) { return $it >= 80 and $it < 90; }, function () { return "好"; }); $switchCase->add(function ($it) { return $it >= 70 and $it < 80; }, function () { return "良"; }); $switchCase->add(function ($it) { return $it >= 60 and $it < 70; }, function () { return "及格"; }); $switchCase->addDefault(function () { return "不及格"; }); }); $console->log($level);