nerdexam
Zend

200-710 · Question #45

SimpleXML provides the ability to iterate over items in an XML document, as well as access items within it as if they were object properties. When creating your own classes to access data…

The correct answer is A. __toString. See the full explanation below for the reasoning.

Magic Methods and Traits

Question

SimpleXML provides the ability to iterate over items in an XML document, as well as access items within it as if they were object properties. When creating your own classes to access data, implementing which of the following would NOT achieve this goal?

Options

  • A__toString
  • BIterator
  • C_get
  • DArrayAccess

How the community answered

(49 responses)
  • A
    71% (35)
  • B
    4% (2)
  • C
    16% (8)
  • D
    8% (4)

Topics

#__toString#Iterator#ArrayAccess#object access

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice