php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43576 no-variables passing by reference
Submitted: 2007-12-12 08:52 UTC Modified: 2007-12-12 09:31 UTC
From: lunter at interia dot pl Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 6CVS-2007-12-12 (CVS) OS: all
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lunter at interia dot pl
New email:
PHP Version: OS:

 

 [2007-12-12 08:52 UTC] lunter at interia dot pl
Description:
------------
I would be nice if PHP 6.x can pass no-variables by reference.

For example: strtoupper on GPC arrays using array_walk_recursive.


Reproduce code:
---------------
<?
 array_walk_recursive(array(&$_GET,&$_POST,&$_COOKIE),create_function('&$v','$v=strtoupper($v);'));
?>


Expected result:
----------------
Like now:

<?
 array_walk_recursive($gpc=array(&$_GET,&$_POST,&$_COOKIE),create_function('&$v','$v=strtoupper($v);'));

 unset($gpc);
?>


Actual result:
--------------
Fatal error: Only variables can be passed by reference


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-12 09:31 UTC] derick@php.net
That's not going to happen
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 06:01:31 2024 UTC