On 28/08/13 17:47, Nikita Popov wrote:
Hi internals!
Hi Nikita :-),
I'd like to propose an RFC, which adds dedicated syntax for variadic
functions:
https://wiki.php.net/rfc/variadics
Basically this allows declaring variadics directly in the function
signature, rather than fetching the arguments using func_get_args().
Example:
public function query($query, ...$params) { /* ... */ }
What are your thoughts on this?
Huge +1!
So if we call query('foo'), $params is set to an empty array, right?
Could it be possible to change this behavior? Would it be interesting?
For example: public function query($query, ...$params = null).
Cheers.
--
Ivan Enderlin
Developer of Hoa
http://hoa-project.net/
PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
http://disc.univ-fcomte.fr/ and http://www.inria.fr/
Member of HTML and WebApps Working Group of W3C
http://w3.org/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php