Well I was wondering, is there a way to pass func_get_args() to another method in the same class or to use it in the constructor of an object without explicitly calling func_get_args()? The idea is that I want to have a root class protected method to handle variable arguments passing using a class/object called Argument, which has some interesting methods to manipulate arguments/parameters. In this way, I do not have to call func_get_args() in every method that accepts variable number of arguments, while a special helper method will do the trick. Also func_get_args() always returns a PHP native array, I want such a function/method to return a collection object.

The problem is, func_get_args() is only available in the scope of the initial function call, if you call func_get_args() from second method in the first method, the argument list passed to the first method will not be available in the second method unless you explicitly pass func_get_args() in the method call. I was wondering if this following syntax is valid:

PHP Code:
class A{
    public function 
a(){
        
$argObject $this->b();
        ... 
additional work ...
    }

    private function 
b($args func_get_args()){
        ... 
convert $args into object ...
        return 
$argObject;
    }
}

$obj = new A;
$obj->a($arg$arg2$arg3...); 
In theory, the func_get_args() default value in method b() is the argument list from client method call $obj->a($arg, $arg2, $arg3...). The idea is that func_get_args() will not be explicitly called in $this->b() method call, but I doubt PHP allows that. If not, is there another way to get around if I just dont want to explicitly write func_get_args() in every method that accept variable arguments?