|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-06 13:38 UTC] fbeyer at clickhand dot de
[2003-01-18 14:48 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
The function func_get_arg() and func_get_args() should support being called to return references: function do_something() { $args = func_get_args(); for ($i=0; $i<count($args); $i++) { do_something_with($args[$i]); } } $ref = new Object(); do_something(&$ref, "String", 0, 1.5); This function could register a dynamic number of variables to the session (references for the Object!!!), create an array or simple call another function with exactly the same arguments. I think it should be no problem for func_get_arg[s]() to save references passed to the function. Like function x($arg1, $arg2) { $args = array(&$arg1, &$arg2); } saves $arg1 and $args by reference if they are passed by reference or by value if they are passed by value. Thank you, looking forward to the new object model in Zend 2!!! Ferdinand Beyer <fbeyer@clickhand.de>