Thanks Chuck, That's what I thought, i.e. the presence of `...` already implies that the parameter is an array, so adding [] should not mean the same thing.
Il giorno mar 16 ott 2018 alle ore 15:03 Chuck Burgess <[email protected]> ha scritto: > On Monday, October 15, 2018 at 4:23:46 PM UTC-5, Stefano Torresi wrote: >> >> Hey list, >> what if one wanted to hint to a varable number of arrays of DateInterval? >> >> e.g. `func(array ...$intervals) {}` >> >> Isn't this what `@param DateInterval[] ...$intervals` should actually be >> used for? >> >> Cheers >> > > > I had thought of this possibility soon after my original email... but was > self-throttling until today to bring it up :-D > > I agree with Stefano, that this use case is feasible, and thus the syntax > needs to account for it. > > So, the datatype part of the syntax represents a series of DateInterval > objects being passed individually, then `@param DateInterval ...$intervals`. > > If it's actually a series of *arrays* that each contain DateInterval > object members, then `@param DateInterval[] ...$intervals` would signify > that. > > CRB > -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFojS1ubVC4XgFKEqwhFZEogx%3DTDXdUv676X1bvwON8sCZMXww%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
