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)- B5% (1)
- C74% (14)
- D16% (3)
- E5% (1)
Community Discussion
No community discussion yet for this question.