将整数 0 作为开关参数将采用第一个结果“foo”:
$data=0; // $data is usually coming from somewhere else, set to 0 here to show the problem
switch ($data) :
case "anything":
echo "foo";
break;
case 0:
echo "zero";
break;
default:
echo "bar";
endswitch;
如何更改此设置,以便开关按预期写入“零”?