Re: Draft RFC: foreach iteration of keys without values

From: Date: Wed, 02 Sep 2020 16:14:34 +0000
Subject: Re: Draft RFC: foreach iteration of keys without values
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-111784@lists.php.net to get a copy of this message
On 02/09/2020 15:31, Thomas Bley wrote:
I'd also like to propose to use null: [null, null, $username] = getUserData(); foreach ($source as $key => null) {}
Exactly what null is designed for ... -- Lester Caine - G8HFL ----------------------------- Contact - https://lsces.uk/wiki/Contact L.S.Caine Electronic Services - https://lsces.uk Model Engineers Digital Workshop - https://medw.uk Rainbow Digital Media - https://rainbowdigitalmedia.uk

« previous php.internals (#111784) next »