Ben Ramsey on Nostr: I can get PHP’s RecursiveDirectoryIterator working by passing it to ...
I can get PHP’s RecursiveDirectoryIterator working by passing it to RecursiveIteratorIterator and looping over it, like here:
https://3v4l.org/ll176But 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/MM7kZWhat am I doing wrong?
Published at
2023-08-26 18:08:33Event JSON
{
"id": "fb7ffe23624e8029ac93e4a5376ea3a848e5b56bbd133bcb16d379449795bc69",
"pubkey": "e653eb60b2db5edf906d354c2825bf00a80dfab1b1766cd97805155e8fcc0db3",
"created_at": 1693073313,
"kind": 1,
"tags": [
[
"proxy",
"https://phpc.social/users/ramsey/statuses/110957252693584297",
"activitypub"
]
],
"content": "I can get PHP’s RecursiveDirectoryIterator working by passing it to RecursiveIteratorIterator and looping over it, like here: https://3v4l.org/ll176\n\nBut 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-\u003evalid() is returning false. https://3v4l.org/MM7kZ\n\nWhat am I doing wrong?",
"sig": "3326e893f878520f3c768d256bb36221fd719b5610bb0d4b56a5ce06123900ef2bbddb40ffeb396ede419342540182f5f79c632486edc111dc4f10a21959d774"
}