Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class/trait/interface "{ClassName}" was added in the global namespace. #112

Open
fanphp opened this issue Jun 26, 2017 · 3 comments
Open

Comments

@fanphp
Copy link

fanphp commented Jun 26, 2017

HI guys,

I'm getting many times this kind of error:
Class/trait/interface "{ClassName}" was added in the global namespace.

I don't undestand why this situation should throws an error in PHP7; at lease, I would expect a warning!

Thanks

@sstalle
Copy link
Owner

sstalle commented Jun 26, 2017

Hello @fanphp. I'm not sure I understand your problem. Can you provide a snippet of code that can be used to reproduce the issue?

@ArchitRastogi1
Copy link

Line 3: [Error] Class/trait/interface "ArithmeticError" was added in the global namespace
class ArithmeticError extends \Error
{
}

@DiFuks
Copy link

DiFuks commented Nov 10, 2017

http://php.net/manual/en/class.error.php
class "Error" is reserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants