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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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 13:01:32 2024 UTC