What is a namespace in PHP used for?
- A Preventing name collisions between classes and functions from different libraries
- B Improving performance
- C Encrypting class names
- D Defining access modifiers
Answer
Preventing name collisions between classes and functions from different libraries
Namespaces make PSR-4 autoloading possible by mapping namespace segments to directory structure.





