nerdexam
Zend

200-530 · Question #3720

How can the constant defined below be accessed from within PHP? class myClass { const FOO = 'BAR'; }

The correct answer is C. myClass::FOO. See the full explanation below for the reasoning.

Question

How can the constant defined below be accessed from within PHP? class myClass { const FOO = 'BAR'; }

Options

  • AmyClass::$FOO
  • BmyClass::$$FOO
  • CmyClass::FOO
  • DmyClass::foo
  • E$foo::myClass

How the community answered

(19 responses)
  • B
    5% (1)
  • C
    74% (14)
  • D
    16% (3)
  • E
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice