Edit report at http://bugs.php.net/bug.php?id=53786&edit=1
ID: 53786 User updated by: fx4084 at gmail dot com Reported by: fx4084 at gmail dot com Summary: about "++" or "--" Status: Open Type: Bug Package: *General Issues Operating System: WIN7 PHP Version: 5.2SVN-2011-01-19 (snap) Block user comment: N Private report: N New Comment: And more exampleï¼ <?php $a = 1,$b = 1,$c=1; $x = $a + 0 + $a++; //$x = 2; $y = 0 + $b + %b++; //$y = 3; //but $z = $c + $c++; //$c = 3 ?> ?> Previous Comments: ------------------------------------------------------------------------ [2011-01-19 11:40:10] fx4084 at gmail dot com Description: ------------ PHP programe likeï¼ <?php $a = 1,$b=1; $a = $a + $a++; $b = $b + $b + $b++; echo $a.' '.$b; //print "3 3"; ?> But the same programe in JavaScript or JAVA or C, it's print "2 3"; Test script: --------------- <?php $a = 1,$b=1; $a = $a + $a++; $b = $b + $b + $b++; echo $a.' '.$b; //print "3 3"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53786&edit=1
