Re: Use behavior thoughts
| From: | Alexander Lisachenko | Date: | Fri, 06 Mar 2015 08:35:43 +0000 |
| Subject: | Re: Use behavior thoughts | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84375@lists.php.net to get a copy of this message | ||
Hello!
2015-03-05 22:40 GMT+03:00 Anthony Ferrara <ircmaxell@gmail.com>:
> This requires use to immediately follow namespace declarations:
>
> namespace Foo {
> use Bar; //valid
> }
> namespace Bar {
> use Foo; //valid, second namespace in file
> }
> namespace Baz {
> echo "Hi!";
> use Foo; // Invalid
> }
>
> This did break approximately 30 internal tests, but they were all
> testing this specific code path (or bugs related to it).
>
I like this way, because it's more logical and readable. There aren't
unpredictable effects and misunderstanding with interpretation of source
code.