Re: [RFC] skipping optional parameters
| From: | Michael Wallner | Date: | Wed, 18 Apr 2012 08:10:24 +0000 |
| Subject: | Re: [RFC] skipping optional parameters | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60166@lists.php.net to get a copy of this message | ||
On 18 April 2012 01:23, Jordi Boggiano <j.boggiano@seld.be> wrote:
> On 18.04.2012 00:54, Stas Malyshev wrote:
>> https://wiki.php.net/rfc/skipparams
>>
>> Basically, it allows you to do this:
>>
>> create_query("deleted=0", "name",,, /*report_errors*/ true);
+1
> - Would it be possible to allow trailing commas in combination to this?
> i.e. foo("arg",) would just call foo with "arg" and then the default
> value for the second arg if there is one, or just nothing. That would
> make multi-line function calls a bit cleaner, and more similar to arrays.
Yet another +1!
--
Regards,
Mike