Declaring sub-namespaces

suggest change

To declare one namespace with a hierarchy, use the following example:

namespace MyProject\Sub\Level;

const CONNECT_OK = 1;
class Connection { /* ... */ }
function connect() { /* ... */ }

The above example creates:

constant MyProject\Sub\Level\CONNECT_OK

class MyProject\Sub\Level\Connection and

function MyProject\Sub\Level\connect

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents