Re: Draft RFC: foreach iteration of keys without values
| From: | Josh Bruce | Date: | Thu, 03 Sep 2020 21:12:46 +0000 |
| Subject: | Re: Draft RFC: foreach iteration of keys without values | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111837@lists.php.net to get a copy of this message | ||
>
> In terms of readability, I'm more likely to do
> $keys = array_keys($array);
> foreach($keys as $key){
Fair point. I would too.
I have actually forgone even grabbing the keys and just using the loop without touching value in the
body.
Cheers,
Josh