RE: [PHP-DEV] Variable scopes for language constructs (foreach, ...)
| From: | John Crenshaw | Date: | Thu, 23 Jun 2011 20:48:26 +0000 |
| Subject: | RE: [PHP-DEV] Variable scopes for language constructs (foreach, ...) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53561@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Derick Rethans [mailto:derick@php.net]
> On Thu, Jun 23, 2011 at 8:49 AM, Martin Scotta <martinscotta@gmail.com> wrote:
>
> I think proposed change is extremely counter intuitive to the design
> of PHP in regard to scoping and would be a very large bc break, PHP is
> doing exactly what it is suppose to do here and I wouldn't want it any
> other way.
Agreed. Although I generally favor the idea of strong scope, it isn't practical to implement in
PHP. It isn't sensible because PHP doesn't require explicit variable declaration, and the
BC break would be crippling.
John Crenshaw
Priacta, Inc.