Is it even possible? Like, for example, list all php files that contain the word “filter”?
Store your files in the files app on iOS and iPadOS and then the contents are indexed. Similar to macOS, once you search for a string, you can restrict it to the current folder if desired.
Search works for me on local files, iCloud files and just ad described above by Apple support pages. The search works for content and for name.
Here is what that looks like:
The source is this screenplay: http://dailyscript.com/scripts/arrival.pdf
The first copy is still in "Downloads" and I duplicated it in files and then moved it to "On My iPhone" to test both an iCloud synchronized and backed location of the file as well as local only storage. This works for many other names and file types / text / PDF and more for me (choosing other names in the screenplay or other search terms that have zero hits for file names and only hits for file content).