What is namespace and use in php?



What is namespace and use in php?..

Answer / Kuldeep Malik

In PHP, a namespace is a container for organizing classes, functions, and constants to prevent naming conflicts. The 'use' keyword allows importing namespaces or individual identifiers from the imported namespace into the current scope, making them accessible without having to specify the fully qualified name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What are the types of variables in php?

1 Answers  


Is age interval or ordinal data?

1 Answers  


What does the function get_magic_quotes_gpc() means?

1 Answers  


Difference between get and post method.

1 Answers  


Explain how can we execute a php script using command line?

1 Answers  


How can you create a session in php?

1 Answers  


Why did you choose this particular career path?

1 Answers  


Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?

1 Answers  


What is namespace and use in php?

1 Answers  


What is the difference between require and include in php?

1 Answers  


display selected value in dropdown list through javascript without page refresh

1 Answers  


What is $this in php?

1 Answers  


Categories