nostr:npub1hdsn205nadzd8d84hkqeq4djprsvdj9x9a3gxhrzqq8wympr2c9qj6u65c Why does the other example with the while loop work without the `rewind()` call, though?
Discussion
nostr:npub1jpp36eeycvlkkdy4d4l4lgswvf8jtdare5vly0w0sk7rc39pzgrqlyu59l That is an excellent question that I fear I'm not equipped to answer. I've tried groking the source code https://github.com/php/php-src/blob/master/ext/spl/spl_iterators.c but, not being a C developer, the closest I can figure is that the Callback / Filter iterator isn't considered 'valid' until it runs the callback and that only happens on rewind or next, not current or construct.