How about having the ellipsis _after_ the variable? That then coincides
with phpDocumentor's recommended syntax of "$c,..." and it keeps any
typehint or & with the variable name ("array &$arr..." versus "array
&...$arr") and, honestly, I think that reads more easily.


On Wed, Aug 28, 2013 at 1:15 PM, Nikita Popov <nikita....@gmail.com> wrote:

> On Wed, Aug 28, 2013 at 9:27 PM, Matthew Leverton <lever...@gmail.com
> >wrote:
>
> > Would any functions get deprecated as a result of this? e.g.,
> > func_get_args()
> >
>
> Nope, func_get_args() etc stay. This is now mentioned in
> https://wiki.php.net/rfc/variadics#userland.
>
>
> > I assume it's a syntax error to do function fn(...$foo, $bar) or
> > function fn(...$foo, ...$bar)
> >
>
> Correct. This is now mentioned in
> https://wiki.php.net/rfc/variadics#syntactic_restrictions.
>
>
> > I assume that function fn($a, $b = null, ...$c) is possible, and the
> > only way to populate $c is to call fn with three or more parameters.
> >
>
> That's also correct :)
>
> Nikita
>

Reply via email to