php代码问题 $a = 3; $b = 5; if ($a=5 || $b = 7) { $a++; $b++; } echo $a ." " .$b; 结果 1 6 why
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 00:31:12
xQMK@+C!!$z_D#lDHSj͡Q*"u&ԋ^vy3y5|zw^}
l ,(8QktX,=oA
P GgRmqXU1yTRN Srѧ^YbIs+NX|T¢q;j,{0ge$I,Ӗ.k%giuns'k7('$y#Ť$˄d+z]/
php代码问题 $a = 3; $b = 5; if ($a=5 || $b = 7) { $a++; $b++; } echo $a ." " .$b; 结果 1 6 why
php代码问题 $a = 3; $b = 5; if ($a=5 || $b = 7) { $a++; $b++; } echo $a ." " .$b; 结果 1 6 why
php代码问题 $a = 3; $b = 5; if ($a=5 || $b = 7) { $a++; $b++; } echo $a ." " .$b; 结果 1 6 why
$a = 3; //赋值
$b = 5;
if ($a=5 || $b = 7)//运算符优先级 逻辑运算符(||)高于赋值运算符(=),即$a = (bool)ture;$b=5;
{
$a++; //$a++ 值不变为1
$b++; //$b++值为5+1
}
echo $a . " " . $b;
var_dump($name);可以看到变量类型.