nerdexam
Zend

200-710 · Question #7

What is the output of the following code? namespace MyNamespace; class Test { } echo Test::class;

The correct answer is B. empty string. See the full explanation below for the reasoning.

Namespaces

Question

What is the output of the following code? namespace MyNamespace; class Test { } echo Test::class;

Options

  • AMyNamespace\Test
  • Bempty string
  • Cparse error
  • DTest

How the community answered

(57 responses)
  • A
    12% (7)
  • B
    77% (44)
  • C
    7% (4)
  • D
    4% (2)

Topics

#::class constant#namespace resolution#class names#fully qualified name

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice