Re: Revisit trailing commas in function call parameters?
| From: | Florian Anderiasch | Date: | Thu, 18 Jun 2015 17:16:24 +0000 |
| Subject: | Re: Revisit trailing commas in function call parameters? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86752@lists.php.net to get a copy of this message | ||
On 18.06.2015 08:25, Yasuo Ohgaki wrote:
>> If people still consider it more harm- than useful then please don't flame
>> me and I'll shut up again :-)
>>
>
> PHP allows
>
> array(
> 1,
> 2,
> 3,
> );
>
> therefore
>
> my_variadic_function(
> "foo",
> "bar",
> "qux",
> );
>
> is consistent behavior to me.
If variadic functions allow this and normal functions don't (and by most
PHP coding standards you'll format like this all the time because of 80
chars limit I don't see how this is in any way consistent. It's still a
function call after all and not an array.
~Florian