Class/trait/interface "{ClassName}" was added in the global namespace.
fanphp opened this issue · 3 comments
fanphp commented
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 commented
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 commented
Line 3: [Error] Class/trait/interface "ArithmeticError" was added in the global namespace
class ArithmeticError extends \Error
{
}
DiFuks commented
http://php.net/manual/en/class.error.php
class "Error" is reserved