Re: list() inside a foreach()
| From: | Nikita Popov | Date: | Thu, 09 May 2013 16:43:13 +0000 |
| Subject: | Re: list() inside a foreach() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67378@lists.php.net to get a copy of this message | ||
On Thu, May 9, 2013 at 6:39 PM, Stefan Neufeind <neufeind@php.net> wrote:
> Hi,
>
> trying out the following source I was astonished to see that using
> list() does not work directly in a foreach() but works fine if used
> through a temporary variable.
>
> Would allowing using list() inside the foreach()-statement be desired
> behaviour? Or is it just me? :-)
>
Support for this has been added in PHP 5.5. RFC:
https://wiki.php.net/rfc/foreachlist
Nikita