//namespace1.php name; } }
//namespace2.php name; } }
The problem is why the following error occurs when I access namespace2.php
Fatal error: Cannot declare class Demo2\test1 because the name is already in use in
Do I have to give the class an alias when using Demo1\test1? ? 'as D1test1'????
Please guide me
The test1 class already exists in demo1. Then you applied the file require('namespace1.php'); and then referenced the demo1 class use Demo1\test1;
Do you think there will be no error? Can you give him an alias?