Description
The following code:
<?php
namespace Ns;
use Ns\Foo;
class Foo {}
Resulted in this output:
But I expected this output instead:
Fatal error: Cannot declare class Foo because the name is already in use
Without namespace, the error is emit as expected - https://3v4l.org/DAT52, but when namespace is declared, the error is not emit even if the the same use/import statement is present - https://3v4l.org/tt1sL.
As the declared Foo class masks the use/import the same way, I would expect an error to be emit in both cases.
PHP Version
any
Operating System
any