Bug #71010 [Com]: Result of the program is not correct while the variable assignment by reference
| From: | miaojuanfeng at qq dot com | Date: | Wed, 02 Dec 2015 07:13:11 +0000 |
| Subject: | Bug #71010 [Com]: 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-197553@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
Comment by: miaojuanfeng at qq dot com
Reported by: miaojuanfeng at qq dot com
Summary: Result of the program is not correct while the
variable assignment by reference
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:
I have pull two request at github:
Fixed bug #71010 ï¼part 1
Fixed bug #71010 ï¼part 2
something failed. Hm...may be I don't know how to use github.
I believe my code is correct.
Previous Comments:
------------------------------------------------------------------------
[2015-12-02 07:13:10] miaojuanfeng at qq dot com
Related To: Bug #71010
------------------------------------------------------------------------
[2015-12-02 07:13:10] miaojuanfeng at qq dot com
Related To: Bug #71010
------------------------------------------------------------------------
[2015-12-01 21:20:19] requinix@php.net
Fixed in PHP 7. https://3v4l.org/GnfFs
Where is your pull request?
------------------------------------------------------------------------
[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