Re: Variable-length args by reference

From: Date: Tue, 17 Apr 2012 22:41:02 +0000
Subject: Re: Variable-length args by reference
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-60121@lists.php.net to get a copy of this message
On Wed, 2012-04-18 at 00:02 +0200, Stefan Neufeind wrote: > How would you think about extending func_get_args() and func_get_arg() > to allow for: > > $args = func_get_args(FUNC_GET_ARGS_BY_REFERENCE); > $arg0 = func_get_arg (0, FUNC_GET_ARGS_BY_REFERENCE); > > (default would be FUNC_GET_ARGS_BY_COPY) Well we have to know the type before actually calling the function as for references we need something we can write to. So unless somebody comes up with a clever trick this would require a new language construct. And well, as a sidenote which I mention often: Don't use references :-) johannes

« previous php.internals (#60121) next »