Re: [RFC] Allow trailing comma in function call argument lists
| From: | Sara Golemon | Date: | Wed, 20 Feb 2013 11:45:27 +0000 |
| Subject: | Re: [RFC] Allow trailing comma in function call argument lists | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-66056@lists.php.net to get a copy of this message | ||
On Wed, Feb 20, 2013 at 3:32 AM, Martin Keckeis
<martin.keckeis1@gmail.com> wrote:
> -1
>
> For array it's okay, but for functions? I think the code is harder to read
> that way...
>
> If I would see a call written this way:
> phpinfo(,)
>
> There are three possible values: Defaultvalue, null or something differnt?
>
You wouldn't see that call, it would be a syntax error. You might see
something like this however, which may illustrate the same point you
were trying to make:
phpinfo(INFO_ALL,);
To me the meaning seems obvious, it's the same semantics as: $a =
array('foo',); which nobody seems to have trouble with. I do
appreciate that you disagree, however.
> @Sara cool base idea ;-) (https://github.com/sgolemon/objectifier)
>
Turns out niki did it first, and his approach was a lot better,
actually: https://github.com/nikic/scalar_objects