Exam 200-710 All QuestionsBrowse all questions from this exam
Question 22

What is the output of the following code?

    Correct Answer: A

    The output of the provided code will be 'MyNamespace\Test'. In PHP, using the `::class` constant on a class returns the fully qualified name of the class, including its namespace. Therefore, since the class Test is defined within the namespace MyNamespace, the output will be 'MyNamespace\Test'.

Discussion
[Removed]Option: A

The correct answer is A : MyNamespace\Test

ZhukovPeterOption: A

Answer is A: namespace MyNamespace; class Test { } echo Test::class; output: MyNamespace\Test