So, when we include them and access them via creating an object then it conflicts.
In this post, we understand namespace with practical examples and we are also gonna see different ways of using it which will solve our name collision problem.
Note that, we have defined namespace event to class eventDetails which means that now class eventDetails is within the namespace event.Now when we try to create an object of class eventDetails then it will throw an Error because now class eventDetails is not bound to global namespace rather it is within namespace event. So to access class, we need to make necessary changes in the object creation and that will show to which namespace particular class belongs.
The biggest OR the common misconception about namespace is that we think that by specifying namespace at the top of the page, we do not require to include that file in the codebase using functions like include/require/include_once/require_once.