mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Don't mix + and ++ (doc bug #53786)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@308186 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
693563124f
commit
a7ef3cd8b1
1 changed files with 4 additions and 0 deletions
|
@ -221,6 +221,10 @@ $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
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue