|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71964 Pass by reference variable modification fails under certain circumstance
Submitted: 2016-04-05 09:27 UTC Modified: 2016-04-05 11:07 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ben dot davies at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Variables related
PHP Version: 7.0.5 OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ben dot davies at gmail dot com
New email:
PHP Version: OS:


 [2016-04-05 09:27 UTC] ben dot davies at gmail dot com
It appears that assigning variables passed by reference does not work under specific circumstances. 
For example in the test script, removing the switch statement in the `bug` function does not trigger the bug.

Having a look around recent bug fixes, this is possibly a regression introduced by

The test script only fails on php 7.0.5

Test script:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-05 11:07 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2016-04-05 11:07 UTC]
this has been fixed in #71914
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 19:01:27 2021 UTC