nostr:npub1hdsn205nadzd8d84hkqeq4djprsvdj9x9a3gxhrzqq8wympr2c9qj6u65c nostr:npub1ttznc78t0jdu8ykwqsxl4dm64v57h7vwjsxe53c2shykz0ulvt3s6w5nu3 has the answer: https://phpc.social/@ghostwriter/110957955815555533
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.
Discussion
nostr:npub1hdsn205nadzd8d84hkqeq4djprsvdj9x9a3gxhrzqq8wympr2c9qj6u65c nostr:npub1ttznc78t0jdu8ykwqsxl4dm64v57h7vwjsxe53c2shykz0ulvt3s6w5nu3 And also, I don’t know why I didn’t go digging through the source myself. I guess I’m lazy. 🤣