> Assuming the RFC as-is represents the current state, I'm +1 on all of it. >> >> I'm not a fan of some of the proposed alterations which would translate >> arrays (a la call_user_func_array()). To clarify, the following output is >> what I'd expect: >> function f(...$args) { >> echo count($args); >> } >> f(1,2,3); // 3 >> f([1,2,3]); // 1 >> >> Not "3" in both cases. >> > > Yes, that's the output you'll get. If it weren't the case it would be > impossible to define a function accepting multiple array arguments like > f([1, 2, 3], [4, 5, 6], [7, 8, 9]). > > Right, that was exactly the ambiguity I was unfond of. Glad that was as I hoped. Voted +1.
- RE: [PHP-DEV] [RFC] Syntax for variadic fun... Zeev Suraski
- RE: [PHP-DEV] [RFC] Syntax for variadic fun... Zeev Suraski
- Re: [PHP-DEV] [RFC] Syntax for variadic functions Patrick ALLAERT
- Re: [PHP-DEV] [RFC] Syntax for variadic functions Lester Caine
- RE: [PHP-DEV] [RFC] Syntax for variadic functions Bryan C. Geraghty
- RE: [PHP-DEV] [RFC] Syntax for variadic functions jbo...@openmv.com
- Re: [PHP-DEV] [RFC] Syntax for variadic functions Sebastian Krebs
- [PHP-DEV] Re: [RFC] Syntax for variadic functions Nikita Popov
- Re: [PHP-DEV] Re: [RFC] Syntax for variadic functio... Sara Golemon
- Re: [PHP-DEV] Re: [RFC] Syntax for variadic fun... Nikita Popov
- Re: [PHP-DEV] Re: [RFC] Syntax for variadic... Sara Golemon