Zend
200-530 · Question #410
Maria creates an application using PHP script. The application contains certain classes. The class design requires that a particular member variable must be directly accessible to any subclass of…
The correct answer is B. Mark the variable as protected. See the full explanation below for the reasoning.
Question
Maria creates an application using PHP script. The application contains certain classes. The class design requires that a particular member variable must be directly accessible to any subclass of this class. What should Maria do to achieve this?
Options
- AMark the variable as private.
- BMark the variable as protected.
- CMark the variable as public.
- DMark the variable as final.
How the community answered
(24 responses)- A8% (2)
- B83% (20)
- C4% (1)
- D4% (1)
Community Discussion
No community discussion yet for this question.