Re: Revisit trailing commas in function call parameters?
| From: | Jakub Kubíček | Date: | Sun, 28 Jun 2015 14:19:31 +0000 |
| Subject: | Re: Revisit trailing commas in function call parameters? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86925@lists.php.net to get a copy of this message | ||
+1 for allowing trailing comma in every function call.
Regards,
Kubo2
2015-06-18 19:16 GMT+02:00 Florian Anderiasch <ml@anderiasch.de>:
> 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
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>