|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
7 + 18 = ?
Subscribe to this entry?

 [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-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 25 18:01:24 2020 UTC