Re: [RFC] Argument unpacking
| From: | Andrey Hristov | Date: | Fri, 30 Aug 2013 20:02:41 +0000 |
| Subject: | Re: [RFC] Argument unpacking | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68758@lists.php.net to get a copy of this message | ||
On 08/30/2013 05:23 PM, Nikita Popov wrote:
Hi internals! This RFC proposes to add a syntax for argument unpacking:can't we use a new cast operator like (unpack) for this instead of the three dots? $db->query($query, (unpack) $params); ? Andreyhttps://wiki.php.net/rfc/argument_unpackingBasically, this is the "complement" of the variadics RFC: It is not about declaring variadic functions, but about calling them. The syntax it introduces looks as follows:$db->query($query, ...$params);Thoughts? Thanks, Nikita