adspace


Why namespace is used in php?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What sized websites have you worked on in the past?

1092


Which variable declarations within a class is invalid in php?

1052


What is the current stable version of php? What advance thing in php7?

1100


How to calculate the difference between two dates using php?

1151


Write a program using while loop?

1128


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1082


Explain me is it possible to destroy a cookie?

1035


What does $_files means?

1170


What is the current stable version of php?

1130


What is trait in php?

1072


how to detect a mobile device using php

1177


What is the difference between htmlentities() and htmlspecialchars()?

1100


Tell me what kind of things have you done on the social side?

1071


How to create a web form?

1116


List some features of php that are deprecated in php7?

1026