#41373 [Com]: Incorrect expression evaluation with pre-increment

From: Date: Sat, 12 May 2007 08:41:56 +0000
Subject: #41373 [Com]: Incorrect expression evaluation with pre-increment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112571@lists.php.net to get a copy of this message
 ID:               41373
 Comment by:       itonix at inet dot ua
 Reported By:      romy4 at online dot ua
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: WinNT,Linux
 PHP Version:      5.2.2
 New Comment:

Very! VERY  important bug


Previous Comments:
------------------------------------------------------------------------

[2007-05-12 08:33:05] romy4 at online dot ua

Description:
------------
PHP incorrectly evaluates code with variable pre-increment

Reproduce code:
---------------
$i=5;
$i=++$i + ++$i;
echo $i;

Expected result:
----------------
Expecting 14
Evaluated 13




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41373&edit=1


Thread (7 messages)

« previous php.bugs (#112571) next »