Bug #71010 [Opn->Ver]: Result of the program is not correct while the variable assignment by reference
| From: | requinix@php.net | Date: | Tue, 01 Dec 2015 21:20:19 +0000 |
| Subject: | Bug #71010 [Opn->Ver]: Result of the program is not correct while the variable assignment by reference | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197550@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71010&edit=1
ID: 71010
Updated by: requinix@php.net
Reported by: miaojuanfeng at qq dot com
Summary: Result of the program is not correct while the
variable assignment by reference
-Status: Open
+Status: Verified
Type: Bug
Package: Scripting Engine problem
Operating System: linux
PHP Version: 5.6Git-2015-12-01 (Git)
Block user comment: N
Private report: N
New Comment:
Fixed in PHP 7. https://3v4l.org/GnfFs
Where is your pull request?
Previous Comments:
------------------------------------------------------------------------
[2015-12-01 15:59:01] miaojuanfeng at qq dot com
Description:
------------
Hi, I'm chinese, I do my best to let each other understand. :)
result of the program is not correct while the variable assignment by reference.
I have fixed the bug and pull request at github.
Test script:
---------------
$a = 1;
$b = &$a;
$c = (++$a)+(++$a)+(++$a);
echo $c;
Expected result:
----------------
9
Actual result:
--------------
10
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71010&edit=1