You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make an object iterable and to make it appear like a collection of objects.
6
+
7
+
## Examples
8
+
9
+
* to process a file line by line by just running over all lines (which have an object representation) for a file (which of course is an object, too)
10
+
11
+
## Note
12
+
13
+
Standard PHP Library (SPL) defines an interface Iterator which is best suited for this! Often you would want to implement the Countable interface too, to allow `count($object)` on your iterable object
0 commit comments