如果 a 等于 b,则打印“1”,如果 a 大于 b,则打印“2”,否则打印“3”。
Output "1" if $a
is equal to $b
,
print "2" if $a
is greater than $b
,
otherwise output "No".
$a = 50;
$b = 10;
@(2) ($a == $b) {
echo "1";
} @(6) ($a > $b) {
echo "2";
} @(4) {
echo "3";
}
$a = 50;
$b = 10;
if ($a == $b) {
echo "1";
} elseif ($a > $b) {
echo "2";
} else {
echo "3";
}