答疑啊$a=1; $b=$a+$a++; echo $b; $a=1; $b=$a+$a+$a++; echo $b; 为什么输出的都是3 分享到: ------解决方案--------------------http://cn2.php.net/manual/zh/language.operators.increment.php $a = 3 * 3 % 5; // (3 * 3) % 5 = 4 $a = true ? 0 : true ? 1 : 2; // (true ? 0 : true) ? 1 : 2 = 2 $a = 1; $b = 2; $a = $b += 3; // $a = ($b += 3) -> $a = 5, $b = 5 // mixing ++ and + produces undefined behavior $a = 1; echo ++$a + $a++; // may print 4 or 5 ?>