How to use “root” namespace of php?

What can I do to make this work ?

Use a leading backslash to indicate the global namespace:

namespace abc;

class AbcException extends \Exception {
// blah blah
}

Useful documents are appreciated.

There’s an entire page devoted to this in the PHP manual!

Leave a Comment