奇怪,這麼基本的雷,我怎麼會今天才踩到。 PHP 的switch case 在做值比對的時候會自動轉型。所以: <?php $key = 'a'; switch ($key) { case true: $value = 'true'; ...
確定! 回上一頁