nerdexam
Zend

200-710 · Question #140

What is the name of the method that can be used to provide read access to virtual properties in a class?

The correct answer is B. __get(). See the full explanation below for the reasoning.

Magic Methods and Traits

Question

What is the name of the method that can be used to provide read access to virtual properties in a class?

Options

  • A__call()
  • B__get()
  • C__set()
  • D__wakeup()
  • E__fetch()

How the community answered

(33 responses)
  • B
    70% (23)
  • C
    3% (1)
  • D
    9% (3)
  • E
    18% (6)

Topics

#__get()#virtual properties#property overloading#magic methods

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice