php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14705 func_get_args(): return references to params?
Submitted: 2001-12-26 16:20 UTC Modified: 2003-01-18 10:43 UTC
From: nick_eby at bonzidev dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.5 OS: linux
Private report: No CVE-ID: None
 [2001-12-26 16:20 UTC] nick_eby at bonzidev dot com
function pointerTest()
{
	$args = &func_get_args();
	pointerTest2(&$args[0]);
	
	$myP = &$args[0];
	pointerTest2(&$myP);
}

function pointerTest2(&$arg1)
{
	$arg1++;
}

$myVal = 10;
pointerTest(&$myVal);
echo $myVal;
-------------------------
i believe that currently func_get_args() can't return an array of references.  it also applies to func_get_arg(int) which can't return a reference to the parameter in question.  could that be changed to allow user-defined functions on variable-length argument lists that operate on their parameters by reference?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-18 10:43 UTC] moriyoshi@php.net
Duplicate of bug #6427
Keep this in one place...

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Nov 16 21:01:32 2019 UTC