>
> So, I created a PR to remove this error:
> https://github.com/php/php-src/pull/1149
> <https://github.com/php/php-src/pull/1149>
+1
>
> Note that there is no BC break here, as it's removing an error condition
> today.
>
> This results in a weird edge case (which is 100% valid, but feels odd):
>
> <?php
> class Test {}
> use Bar\Test;
> var_dump(new Test); // class(Bar\Test)
>
> That's perfectly valid, if not a bit weird.
>
> The reverse would error mind you:
>
> <?php
> use Bar\Test;
> class Test {}
>
> Because you've already defined the symbol Test in the file.
>
> To get around this, I've created another PR with a BC break, adding a
> compile error if code comes before `use`:
> https://github.com/php/php-src/pull/1150
-1, the example you gave looks totally valid.
Regards,
Mike