Operator precedence is undefined?
| From: | Yasuo Ohgaki | Date: | Sat, 20 Jul 2013 00:12:52 +0000 |
| Subject: | Operator precedence is undefined? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-68229@lists.php.net to get a copy of this message | ||
Hi all,
Take a look at this bug report.
https://bugs.php.net/bug.php?id=65087
He complains about documentation of ++/--.
The doc says
http://www.php.net/manual/en/language.operators.precedence.php
---------------
// mixing ++ and + produces undefined behavior
$a = 1;
echo ++$a + $a++; // may print 4 or 5
---------------
"may print 4 or 5"?? Undefined??
In old PHP there may be such limitation.
I cannot believe this is true now, but I ask list before I fix doc.
Any comments?
--
Yasuo Ohgaki
yohgaki@ohgaki.net