|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69821 Re-assigning argument affects func_get_args()
Submitted: 2015-06-13 19:23 UTC Modified: 2015-06-13 19:34 UTC
From: Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 7.0.0alpha1 OS:
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:
New email:
PHP Version: OS:


 [2015-06-13 19:23 UTC]
When re-assigning an argument in a function, func_get_args() doesn't return the original argument values anymore.

I found this while using Doctrine 2.3: .

Test script:

function test($a) {
    $a = "overridden";


Expected result:
array(1) {
  string(8) "original"

Actual result:
array(1) {
  string(10) "overridden"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-13 19:34 UTC]
-Status: Open +Status: Not a bug
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 13:05:53 2022 UTC