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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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 Oct 31 23:01:28 2024 UTC