Re:New Features in PHP 5.6
by foldor on Friday January 17, 2014 @01:26PM
(#7077476)
I'm liking the variadic functions syntax. It's definitely better than requiring all extra parameters to be sent as arrays. Even if that's how they end up in the function.
[ Parent
| on HN ]
The current implementation doesn't require extra params as arrays... you can pass as many (or as few) parameters to any PHP function regardless of defined function signature; the declared parameters will be auto-populated. Additionally, you can call func_get_args() inside of any function and get an array with all params, meaning it's a trivial array_slice (and/or list) away from extracting all vargs.
That said, the new ...$params is 100% better.