Re: Draft RFC: foreach iteration of keys without values

From: Date: Wed, 16 Sep 2020 02:00:12 +0000
Subject: Re: Draft RFC: foreach iteration of keys without values
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111867@lists.php.net to get a copy of this message
> * If PHP had either convention or special handling for _ or $_ as a “ignore this” > destination, I wouldn’t have made the proposal. However, it doesn’t; _ can (apparently!) be a > constant, and is also a function, and $_ has no special handling (and I bet it’s actually used to > contain values that are used in at least one application). Saw this today and the list() each() made me think of this thread: https://www.dyn-web.com/php/arrays/iterate/ With you on void for same reason and what if the double-arrow was all that was needed, like the empty + comma in the link: foreach ($arr as $key =>) Cheers, Josh

« previous php.internals (#111867) next »