I’m trying to get my head around namespaces, mainly because I’m trying to use PHPBB in conjunction with my own framework, and both are defining a Template class :confused:

I’m just trying to work out how you’d decide what namespace something should go in… it seems as simple as definig a single namespace for a whole project (ie, my framework) and using that, or should it be split up further into sub-namespaces? What would be the advantages of doing that?

There seems to be plenty of resources around on how to use them, but none I can find on best practices or even practical examples :confused:

It really boils down to how you want things to be organized. You don’t need sub-namespace if you don’t think it will help you. Its all personal preference.