Remove untrue comment from operator precedence

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330983 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yasuo Ohgaki 2013-07-20 03:17:00 +00:00
parent 21d7ec724a
commit c6b0a258de

View file

@ -225,15 +225,16 @@
<![CDATA[
<?php
$a = 3 * 3 % 5; // (3 * 3) % 5 = 4
// ternary operator associativity differs form C/C++
$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
// mixing ++ and +
$a = 1;
echo ++$a + $a++; // may print 4 or 5
echo ++$a + $a++; // same as ++$a; $a + $a; $a++; print 4
?>
]]>
</programlisting>