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)- A79% (33)
- B14% (6)
- C5% (2)
- D2% (1)
Topics
#ArrayAccess#object iteration#foreach#Iterator interface
Community Discussion
No community discussion yet for this question.