nerdexam
Zend

200-530 · Question #197

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

The correct answer is C. implements Iterator and ArrayAccess. See the full explanation below for the reasoning.

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

(54 responses)
  • A
    6% (3)
  • B
    4% (2)
  • C
    76% (41)
  • D
    15% (8)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice