php-file-iterator is a small library that walks directory trees and yields files matching include/exclude rules, commonly used to discover test files. It supports filtering by suffixes or prefixes (for example, “Test.php”) to keep selection deterministic. Exclusion lists help you skip vendor directories, VCS folders, or generated artifacts that would otherwise slow down tools. The iterator interface means results are streamed rather than loaded at once, which keeps memory usage modest on large codebases. It also plays nicely with glob patterns and SPL iterators, so you can combine it with other filesystem utilities. As part of the PHPUnit tooling suite, it’s optimized for speed and predictable behavior across platforms.

Features

  • Recursive file discovery with prefix and suffix filters
  • Exclude lists for vendor, VCS, cache, or build directories
  • Lazy iteration to keep memory usage low on big projects
  • Simple API that composes with SPL and glob utilities
  • Cross-platform path handling for consistent results
  • Battle-tested in PHPUnit workflows for test file discovery

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

BSD License

Follow php-file-iterator

php-file-iterator Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of php-file-iterator!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2025-10-22