Re: Draft RFC: foreach iteration of keys without values
| From: | David Rodrigues | Date: | Wed, 02 Sep 2020 14:24:44 +0000 |
| Subject: | Re: Draft RFC: foreach iteration of keys without values | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111782@lists.php.net to get a copy of this message | ||
I think "void" is a good solution and is very clear, compared to "_".
[void, void, $username] = getUserData();
Atenciosamente,
David Rodrigues
Em qua., 2 de set. de 2020 às 10:57, Dik Takken <dik.takken@gmail.com>
escreveu:
> On 02-09-2020 15:35, Chase Peeler wrote:
> > Isn't the underscore an alias for gettext()?
>
> You are right, it is. Now this does not necessarily mean that underscore
> cannot be used for ignored variables. Depending on the context in which
> it is used an underscore may or may not be ambiguous.
>
> Since we are talking about using underscore in places where a variable
> name is expected, there may not be any problem at all. But we should be
> aware of all cases in which ambiguous syntax could emerge and identify
> any issues. So thanks a lot for pointing out this possible trouble maker!
>
> Regards,
> Dik Takken
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>