I don’t know why, but apparently `foreach` makes a difference. Maybe something is confusing `valid()`? https://3v4l.org/vCif6
I can get PHP’s RecursiveDirectoryIterator working by passing it to RecursiveIteratorIterator and looping over it, like here: https://3v4l.org/ll176
But I can’t seem to figure out how to get this working with RecursiveCallbackFilterIterator. From my understanding, this should have the same output as the example above, but it’s not even looping because $contents->valid() is returning false. https://3v4l.org/MM7kZ
What am I doing wrong?
Discussion
nostr:npub1jpp36eeycvlkkdy4d4l4lgswvf8jtdare5vly0w0sk7rc39pzgrqlyu59l I’m not sure what difference I’m supposed to see. All 8 versions are the same. EOL may be?