Why namespace is used in php?



Why namespace is used in php?..

Answer / Sudhanshu Shekhar Singh

Namespaces are used in PHP to prevent naming conflicts between different classes, functions, or constants within a program or between different programs. They allow organizing and grouping of identifiers (names) so they don't collide with other names created by different code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

how to store date to database

5 Answers   ConSim,


What is the best website to learn php?

1 Answers  


What is php crud api?

1 Answers  


is php is the best for this situation

2 Answers  


What are the differences between procedure-oriented languages and object-oriented languages?

6 Answers   ASD Lab, DewSoft,


What are the different types of errors in PHP?

5 Answers  


How can we submit a form without using submit buttons?

1 Answers  


What is xss in php?

1 Answers  


How do you find the length of a string in php?

1 Answers  


What is use of isset function in php?

1 Answers  


Is string php function?

1 Answers  


What is form action php?

1 Answers  


Categories