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
Train ML Models With SQL You Already Know Icon
Train ML Models With SQL You Already Know

BigQuery automates data prep, analysis, and predictions with built-in AI assistance.

Build and deploy ML models using familiar SQL. Automate data prep with built-in Gemini. Query 1 TB and store 10 GB free monthly.
Try 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