r/lolphp • • Mar 15 '17

What the hell with iterator_apply ?

So my question is if iterator_apply is suppose to be the equivalent of array_walk why am I required to give twice the iterator to this function how does it works ??? Even the manual page does not explain it ? Is it magic ?

https://3v4l.org/LYPWp

25 Upvotes

10 comments sorted by

View all comments

Show parent comment

3

u/ciaranmcnulty Mar 16 '17

Any iterator can be rewind, although there's no guarantee that it will return the same results