What are PHP namespaces?

Namespaces are qualifiers that are used to group the classes that work together. They are usually used to encapsulate classes, interfaces, functions, and constants that perform similar tasks.

Syntax:  

namespace example;

This creates a namespace by the name of “example”


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *