[PHP-NOTES] note 130236 added to class.recursivedirectoryiterator

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
The simplest recursive glob:

<?php
function rglob($pattern) {
	yield from glob($pattern);
	foreach (glob(dirname($pattern) . "/*", GLOB_ONLYDIR) as $dir) {
		yield from rglob("$dir/" . basename($pattern));
	}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 217.30.64.206)
----
Manual Page -- https://php.net/manual/en/class.recursivedirectoryiterator.php
Edit        -- https://main.php.net/note/edit/130236
Del: integrated  -- https://main.php.net/note/delete/130236/integrated
Del: useless     -- https://main.php.net/note/delete/130236/useless
Del: bad code    -- https://main.php.net/note/delete/130236/bad+code
Del: spam        -- https://main.php.net/note/delete/130236/spam
Del: non-english -- https://main.php.net/note/delete/130236/non-english
Del: in docs     -- https://main.php.net/note/delete/130236/in+docs
Del: other reasons-- https://main.php.net/note/delete/130236
Reject      -- https://main.php.net/note/reject/130236
Search      -- https://main.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.