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
Earn up to 15% annual interest with Nexo. Icon
Earn up to 15% annual interest with Nexo.

Access competitive interest rates on your digital assets.

Generate interest, borrow against your crypto, and trade a range of cryptocurrencies — all in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
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