1.

Which one of the following is the correct way of declaring a namespace?(a) namespace my;(b) namespace my();(c) my namespace;(d) namespace(my);I had been asked this question in quiz.The question is from Object Tools-1 in section Object Tools and Design and Variables in PHP of PHP

Answer»

Correct answer is (a) namespace my;

EXPLANATION: The namespace declaration MUST be the FIRST statement in its FILE.



Discussion

No Comment Found

Related InterviewSolutions