Within our namespaced class files, there’re various classes which have the namespace prefixed with a backslash and numerous others which don’t.
Is there a difference between the two? Which is preferable to be using?
e.g.
use namespace\ui\User
vs
use \namespace\ui\User
where namespace itself represents the root folder where the namespaced classes reside.
From the PHP documentation:
This means that you can, and should, omit the leading \ when importing/aliasing.