php.net |  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
Votes:1
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
 [2016-04-05 09:27 UTC] ben dot davies at gmail dot com
Description:
------------
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 https://bugs.php.net/bug.php?id=71756.

The test script only fails on php 7.0.5

Test script:
---------------
https://3v4l.org/KB4sC

Expected result:
----------------
string

Actual result:
--------------
@string@

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-05 11:07 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2016-04-05 11:07 UTC] laruence@php.net
this has been fixed in #71914
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC