Re: Variable scopes for language constructs (foreach, ...)
| From: | David Muir | Date: | Sun, 26 Jun 2011 23:57:32 +0000 |
| Subject: | Re: Variable scopes for language constructs (foreach, ...) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53590@lists.php.net to get a copy of this message | ||
>> personally I find that weird, and unintuitive, but changin that in a major
>> or minor version could be changed if we chose to.
> I think it's a behaviour that could be changed in some step like from
> 5.3 to 5.4 or so. Personally I don't think it would influence existing
> implementations much (who uses the key/value of a foreach after the
> loop?) or could easily be changed.
I do, and I've seen the construct used many times. It would be a major
pain to track down and fix if this behaviour changes.
Cheers,
David