Hi Kenan,
The problem would/should only occurred if and only if your server is not recognize the namespace keyword. And as per https://www.php.net/ Namespace is implemented from version 5.3.0. So if php version of your server is 5.3.22. The error should not be occurred!
You may try to execute a simple script with single line of code like
namespace MyNameSpace;
if it also throws an error. Than its obvious, your server could not recognize the namespace keyword. try to run a script with
phpinfo(); function to be sure about the PHP version you are running.
Thanks.