nerdexam
Zend

200-710 · Question #192

The constructs for(), foreach(), and each() can all be used to iterate an object if the object...

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

Object-Oriented Programming

Question

The constructs for(), foreach(), and each() can all be used to iterate an object if the object...

Options

  • Aimplements ArrayAccess
  • Bimplements Iterator
  • Cimplements Iterator and ArrayAccess
  • DNone of the above

How the community answered

(42 responses)
  • A
    79% (33)
  • B
    14% (6)
  • C
    5% (2)
  • D
    2% (1)

Topics

#ArrayAccess#object iteration#foreach#Iterator interface

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice